Hi,
I am working on a static xdp template and stuck at a point where JavaScript doesn't work anymore.
I am trying to show/hide subforms depending on the values of XML nodes in the XML file.
I have tried the following:
- Get the values of XML nodes form the XML file and store it in a variable.
For example:
var test = xfa.data.resolveNode("Document.Data.General_Information...").value;
if(test == "yes") {
//show subform
} else {
//hide subform
}
It looks simple but i have to get the values for 400 variables and if a node is missing from the XML file javascript breaks at that point and doesn't process or get the values for rest of the variables.
example:
var 1 = xfa.data.resolvnode.....
var 2 = xfa.data.resolvnode.....
var 3 = xfa.data.resolvnode.....
var 4 = xfa.data.resolvnode.....
if a node is missing in the XML file at var 2, javascript doesn't execute or get the values for var 3 and var 4.
How do I solve this problem? Any suggestions?