Unable to set the value of a textbox from Folder-Level javascript

Avatar

Avatar

dada1221

Avatar

dada1221

dada1221

05-08-2016

Hello!

I am trying to set the value of a textbox from a Folder-Level javascript but the value does not change on the textbox.

I am able to get the current value but unable to change the value.

This works when I run it from livecycle but not from Folder-Level.

function Test()

{

     var txtResultField = this.getField("form1[0].#subform[0].txtResultField[0]");

     var text = txtResultField.value;

     app.alert(text); //I get the correct current value of the textbox

     txtResultField.value = "abc123"; //Unable to set value here. I also tried with rawValue and valueAsString

     //I also tried to do this.getField("form1[0].#subform[0].txtResultField[0]").value = "abc123"; and it didn't work either.

}

app.addMenuItem({cName:"-", cParent:"Help", cExec:" "});

app.addMenuItem({cName:"Get Field Value", cParent:"Help", cExec:"Test();"});

This is my textbox:

998160_pastedImage_12.png

Any help would be appreciated!

Thank you!

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar

dada1221

Avatar

dada1221

dada1221

09-08-2016

Bump?

Thank you