Avatar

Level 2

Two elements are involved:

Dropdown list called TransactionType - possible values are "A" "B" or "C"

Checkbox chkVerification

I have created the following javascript for the change event of the dropdownbox TransactionType

form1.#subform[0].TransactionType::change - (JavaScript, client)

if(this.rawValue == "A"){chkVerification.caption.value.text.value = "Verification A"}

else if(this.rawValue == "B"){chkVerification.caption.value.text.value = "Verification B";}

When I check the script syntax it comes up without any errors, but when I change the value in the drop down the caption of the checkbox never changes.

What am I missing here?

By using the app.alert function I think I can see that I need to trigger the script as xfa.event.newText  but the caption isn't changing.

I've also tried this :

form1.resolveNode("chkVerification.caption.value.#text").value = "Verification A";

Is what I'm trying to do even possible?