Below is the code snippet:
<textarea
class="textarea" id="about_us" placeholder="Place some text here"
style="width: 100%; height: 100%; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;"
>
</textarea >
However, I am facing an issue with my JavaScript code: I am able to receive data, but the RichTextarea is not displaying. You can view the RichTextarea image here.
<script>
$(document).ready(function () {
$(document).on('click', '.editbtn', function(){
var Pedit_id = $(this).attr("id");
$.ajax({
url:"../fetch/editproduct.php",
method:"POST",
data:{Pedit_id:Pedit_id},
dataType:"json",
success:function(data){
$('#about_us').val(data.product_dec);
}
});
});
});
</script>
I request assistance to identify where I have made a mistake. My objective is to retrieve data from a MySQL database using AJAX upon button click, and display it in a specific textarea. I appreciate your help in solving this issue. Regards, Ahsan Javed