Skip to end of metadata
Go to start of metadata

Screen-level external JavaScript files are only loaded when a particular application screen is reached by the user. Once the JavaScript code is loaded into memory, it is not unloaded until the session ends.

The JavaScript file to load is specified on the "external javascript" screen-level property. The Visual Designer provides a convenient IFS file browse dialog for this property. The typical IFS directory to store such files is /www/profoundui/htdocs/profoundui/userdata/js.

If it is necessary to load more than one JavaScript file per screen, you can right-click the property and select the option labeled Add Another Exernal JavaScript.

Note that it may not be possible to use the JavaScript code loaded at the screen-level on the "onload" event.  This is because JavaScript code loads asynchronously and may not have finished loading by the time the event has fired.  To resolve this, the JavaScript file may need to be loaded on a previous screen or globally. 

Example:

The following JavaScript code would be saved in a file on the IFS.

Then, the "external javascript" property should be assigned to the path for this file. Finally, "validateNewsletterSetting()" will be placed on the "onsubmit" screen-level event.

Labels
  • No labels