Skip to main content

I set for an element MultiLine Textbox ClinetID variable and I'm trying to get inner HTML text from that control. But functions 

var txtTitle = NWF$('#' + MAAgreementClientID).find('div').innerHTML;

and

var txtTitle = NWF$('#' + MAAgreementClientID).text();

return me empty strings. 

How Can I get inner HTML text from control MultiLine Textbox by JavaScript function?

Hi,

 

you can try to lookup DOM structure inside Developer Console. I am doing it the other way round - I am setting CSS class for the control and then using that class to reference my control, e.g.:

NWF$("textarea.TEXTAREA_CLASS").text()

and for the rich text:

NWF$("div[class='TEXTAREA_CLASS']").html();

Regards,

Tomasz


Reply