I have a LCD form with multiple pages and 28 numeric fields on each page. I want to place a script (which calls a Script Object Function) in the Exit event of each field. I am hoping there is an easier way to do this than retyping the script in each and every field.
Is it possible to do this? I thought the Acro form 'addScript' function may be the solution but I can't seem to get it to work. Can this be done via a Console window, a batch file? (Write a .js file and run it in Windows?)
I've been trying to test it in a Console window (while the form is open in LCD) even just pointing to a single field, but I cant seem to get it to work. In fact I keep getting the error:
NotAllowedError ; Security settings prevent access to this property or method.
Doc.addScript:4:Console undefined:Exec
[color=green]// var f points to a single field for test purposes[/color]
[color=green]// the addScript function parameter 'script name' is the function name used in the Script Object. I dont know how this parameter is applied/utilized since this is not an Acro form Document Level script[/color]
var f = "form1.P4.Tickets.TktMonDetails.Mon.M1"; event.target = "f.event"; f.event = "Exit"; addScript ("TktDetailExit", "TktExitBehavior.TktDetailExit();");
Any help would be appreciated.
[color=blue]EDIT: Let me add that the form previously has Reader user rights enabled and now I am amending the form with additional pages. Could this have anything to do with the error message I get?[/color]
The console output is "Exit" but the script is not written to the document, at least not where I want it to be.
What have I done wrong in my code?