Expand my Community achievements bar.

SOLVED

Setting the XML tag value in Java script

Avatar

Level 10

Hi,

   I am trying to set a XML tag value in the initialize event of a text field.. The code works fine in FormCalc but I needed it to work in java script.

     FormCalc:

     $record.prospectApplication.typeName = "namedInsured";

     Java Script:

     xfa.record.prospectApplication.typeName = "namedInsured";

     The above JavaScript does not work. Can any one help on this?

Thanks

Srini

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Srini,

In JavaScript you don't get any default properties so you need to say;

xfa.record.prospectApplication.typeName.value = "namedInsured";

That is assign the value to the "value" property not the dataValue object.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi Srini,

In JavaScript you don't get any default properties so you need to say;

xfa.record.prospectApplication.typeName.value = "namedInsured";

That is assign the value to the "value" property not the dataValue object.

Avatar

Level 10

Thank you for your reply. It resolved my issue.