var nNumber = NumericField1.rawValue - NumericField2.rawValue;
if (nNumber > 2 || NumericField3.rawValue > 5) {
TextField1.presence = "visible";
TextField2.presence = "hidden";
}
I can't get seem to get this code to work. Should this code work in terms of the formula, symbols, etc?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Script looks okay. Is the language set to JavaScript? Is the form saved as a Dynamic XML Form in the save-as dialog?
Niall
Views
Replies
Total Likes
Hi,
Script looks okay. Is the language set to JavaScript? Is the form saved as a Dynamic XML Form in the save-as dialog?
Niall
Views
Replies
Total Likes
Yes and Yes... It's chock full of many "if, and, or, else if"statements and it's all working fine except for this code.
I'm thinking that another if statment associated with one of the numeric fields that javascript code is working with, is preventing the code i want from working properly.
I'm going to examine it more later, I just wanted to know if the code should work by the looks of it, thanks.
Views
Replies
Total Likes
Hi,
Open the JavaScript Consolr (Control+J) and then interact with the referenced fields. If there is a problem with the script it is likely that it will show up in the console.
Also check the references to the objects. If the object that contains the script is separated from the references objects, then you will need a fuller reference.
Good luck,
Niall
Thanks Niall.
By the way, in order for Ctrl + J to open the javascript debugger, users must have javascript debugging enabled in Acrobat Pro first. I had to follow these instructions to get the debugger to run: http://livedocs.adobe.com/livecycle/8.2/acrobat_designer/wwhelp/wwhimpl/common/html/wwhelp.htm?conte...
Another question I just thought of... Should the code I referenced in my original post be placed in the validate, exit or change event?
Views
Replies
Total Likes
I think I've got it now... change and exit events work fine for the objects I'm referencing in the script.
I've also got the all my if/or/else scripts working properly now. I just had to apply the same script to all the affected objects on either the change or exit events.. I'm referencing text fields, numeric fields, a decimal field, and a radio button list. (Just in case anyone else sees this and is wondering).
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies