Commander
Commander
183 views

form global variable

Folks:

I had a client who has upgraded to IDM 4.8.1, and it broke a PRD I built for them. The issue that appears to have arisen is that I had a trick which allowed me to access the form and IDVault objects from within form scripts. I added the following code to the form --> events --> onload handler script:

  • Form = form;
  • IDV = IDVault;

By not declaring the variables with "var", these objects were instantiated globally and accessible from the scripts without passing them in as a parameter when invoking the function, simply by replacing IDVault with IDV and form with Form.

Now I see this:

An error 'ReferenceError: Form is not defined' was encountered while executing the script 'publishEvent(field,event)'
An error 'ReferenceError: Form is not defined' was encountered while executing the script 'publishEvent(field,event)'
DEBUG: An error 'ReferenceError: Form is not defined' was encountered while executing the script 'in IDVault.globalQuery()'

Perhaps I have exploited a bug in all prior releases but I used it widely through a very extensive and complex PRD. I am hoping someone might know how to make these declarations in 4.8.1+, if not I have quite a bit of rework to do.

Thanks
Rob

Labels (1)
0 Replies
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.