Copy link to clipboard
Copied
I cannot identify why I am receiving this message:
ERROR MESSAGE:
RangeError: Invalid argument value.
Field.display:2:Field rdo.Trid:Mouse Enter
SCRIPT: this is a mouse enter script attached to a radio button and manipulates the text field, "txt.HelpPage6".
var help6 = this.getField("txt.HelpPage6");
help6.display = display.visible;
help6.value = "\rNOTE: Although the lender's and owner's premiums will populate automatically when you click here, you may change their values in the 'Premium' field in the cost columns of Section 17.a. or 17.b. To reinstate the auto-generated premiums simply click here again."
COMMENT: This script worked just as intended for three days before this error surfaced and no changes have been made in the relevant fields.
BTW, what might have happened is a bug in some code overwrote the value of display.visible, which should be 0. This should go away with a restart of Acrobat, as long as the buggy code does not execute again.
Copy link to clipboard
Copied
In the interactive JavaScript console, enter this line of code:
display.visible
and press Command + Return
It should then return a value of zero:
0
Report back if it shows something else. You could also try replacing display.value with 0 (zero) to see if it makes a difference.
Copy link to clipboard
Copied
BTW, what might have happened is a bug in some code overwrote the value of display.visible, which should be 0. This should go away with a restart of Acrobat, as long as the buggy code does not execute again.
Copy link to clipboard
Copied
I entered display.visible in the console, pressed command + return and the returned value was 0
I believe it was bug as described: When I restarted Acrobat the problem had disappeared.
Copy link to clipboard
Copied
If it was a bug, it was most likely in some JavaScript code somewhere. If it was in some code that you wrote, it would be worth trying to track it down so this doesn't happen again.
Copy link to clipboard
Copied
I had been using the syntax f.hidden = true and f.hidden = false extensively in my project until I stumbled across the fact that that method has been superseded by f.display = display.hidden and the other display keywords. I have found that as I correct scripts one at a time from true / false to the keyword method I frequently received the Range Error message after each modification, but only until I closed and re-opened Acrobat.
After learning here about this I edited "All Javascripts" with search and replace rather than doing it piecemeal, and have had no further Range Error messages.
Copy link to clipboard
Copied
Thank you. I had been using the syntax f.hidden = true and f.hidden = false extensively in my project until I stumbled across the fact that that method has been superseded by f.display = display.hidden and the other display keywords. I have found that as I correct scripts one at a time from true / false to the keyword method I frequently received the Range Error message after each modification, but only until I closed and re-opened Acrobat.
After learning here about this I edited "All Javascripts" with search and replace rather than doing it piecemeal, and have had no further Range Error messages.
David
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more