Skip to main content
Nintex Community Menu Bar

Get innerHTML from element by ClientID variable

  • December 7, 2018
  • 1 reply
  • 23 views

Forum|alt.badge.img+2

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?

1 reply

TomaszPoszytek
Forum|alt.badge.img+17

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