cancel
Showing results for 
Search instead for 
Did you mean: 
sojanm
Nintex Newbie

Is this javascript correct?

Jump to solution

Hi

Is this statement correct

var yourControl = NWF$("#"+ jvarCtl);

var value = yourControl.find("option:contains[title='" + CtlValue + "']").attr("value");

Basically the idea is to find a part of the text in the dropdown list and set that value to the control.

Thanks

Tags (1)
0 Kudos
Reply
3 Replies
Automation Master
Automation Master

Re: Is this javascript correct?

Jump to solution

try following:

to search for a value:

var yourControl = NWF$("#"+ jvarCtl);

var value = yourControl.find("option[value*='" + CtlValue + "']").attr("value")

to set the value:

yourControl.val(value);

View solution in original post

Reply
sojanm
Nintex Newbie

Re: Is this javascript correct?

Jump to solution

Great , it worked, thank you Marian.

0 Kudos
Reply
Automation Master
Automation Master

Re: Is this javascript correct?

Jump to solution

glad to know.

consider to set the thread answered.

0 Kudos
Reply