set value or html in a jHtmlArea using Jquerry

Jul 22, 2010 at 6:52 AM

i got  jHtmlArea fine.

I am making the   text area  by using $("#txtareaId").htmlarea();

but I am not able to set its value using

$("#txtareaId").val("some string ......");

when i remove $("#txtareaId").htmlarea(); then setting  values work fine (as it is a normarl non html text box)

How can i set value or html in a  jHtmlArea using Jquerry

 

Jul 27, 2010 at 2:40 PM

It has been solved

i created a parent div div0 to the controll

and the div inner Html is replace.

and the htmlarea(); is applied again to get the htm text box

 

document.getElementById("div0").innerHTML = '<textarea name="txtComments" id=" txtareaId"></textarea>'

$("#txtareaId").html(data.MonthlyAppraisal);

$("# txtareaId”).htmlarea();

 


……………………………………………………………………………………………………………………………………..

var textBoxId = "txtAch_" + index.toString()

                    var textBoxWrapperDiv = "div" + index.toString();

                    document.getElementById(textBoxWrapperDiv).innerHTML = '<textarea name="txtSelfComments" class="required width_70 height_txtarea" id="' + textBoxId + '"></textarea>'

                    $("#" + textBoxId).text(data.MonthlyAppraisal);

                    $("#" + textBoxId).htmlarea();