Load Javascript resource
Loads a Javascript resource from the etc/scripts directory. This script will be found at the file location as defined by the app.docs_root configitem in the wietmsd.xml configuration.
Example API call
/servlets3/wietmsd?id=1459258522338&date=1459947343895&target=resource&action=script&file_name=cvPortal.js
Parameters
| Parameter | Description |
|---|---|
target | resource |
action | script |
file_name | The full name of the Javascript file, such as cvPortal.js. |
id | A session ID that was retrieved with or without a specific collection and publication combination |
date | To prevent browser-side caching of data, especially with AJAX requests, it is important to make a URL unique. The most effective technique to accomplish this is to include a time parameter that is based on the time at which the call is made. |
Returns
- On success
- The text of the Javascript file.
- On failure
- A message indicating that the requested JavaScript file was not found.