I have a CKEditor text box:
<textarea cols="80" id="taBody" name="taBody" class="ckeditor" rows="10" runat="server"></textarea>
I have jQuery trying to set a value from a database:
$('#ContentPlaceHolder_taBody').val(substr[5]);
Donβt worry about the substring in which I already tested that it returns a string. For testing purposes, I replaced the substring "test" and got the same problem.
I know that the jquery surrounding this line does not affect it, because the other text fields I'm trying to fill work. Just when it comes to ckeditor.
Here is the script as a whole:
function (obj) { $.ajax({ type: "POST", url: "ContentSections.aspx/GetContentDetails", data: '{"nodeID": "' + obj.attr('id') + '"}', contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { var str = msg.d; var substr = str.split('|||'); $('#ContentPlaceHolder_hfContentSectionID').val(substr[0]); $('.txtAlias').val(substr[1]); $('.txtBrowserTitle').val(substr[2]); $('.txtMetaDescription').val(substr[3]); $('.txtMetaKeywords').val(substr[4]); $('#ContentPlaceHolder_taBody').val(substr[5]); } }); }
The problem was that nothing was populated and no javascript errors were shown.
I tried to read, but could not find anything that helped me. Does anyone have any idea?
balexander
source share