Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The external JavaScript files referenced are a small set of JavaScript files installed on the web server to support WAMs. These scripts are loaded into a subdirectory /script directly under the image directory. If you create your own script weblet, ensure that the scripts included in the shipped std_script weblet are included in your script weblet.

Info
Image Modified These files are shipped minified (most whitespace removed). The non-minified versions of these files are also shipped in the same directory.

If you wish to provide your own localized versions of the JavaScript messages, make a copy of std_script_messages.min.js and translate the messages. Then edit the language specific version of the std_locale weblet and update the lweb_script_messages_file and lweb_script_messages_file_charset variables.

To add your own JavaScript files to a page or layout, Enroll your JavaScript file as a Web Images external resource. Add the external resource to the webroutine or weblet that requires it. The corresponding <script> element will be added at runtime automatically.


Note

Notes:

  • Every layout has a javascript_files property, which is passed to the std_script weblet.

...

  • This parameter takes a comma-delimited list of file names (assumed to be relative to the /script directory).
  • From Version 13.0, WAM output is in UTF-8. <script> elements for the javascript_files property didn't have a charset attribute, therefore they were assumed to be in the same character set as the main document. To preserve backwards compatibility, they now have a charset attribute that defaults to "shift_jis" for language JPN and to "iso-8859-1" for all other languages. If you need to nominate a different character set, use the javascript_files_charset property in weblet std_script (you will need to add this parameter to your site layout). A better approach is to register your extra JavaScript files as external resources and include them as such.

...

  • Several of the shipped weblets also include small inline JavaScript functions in the XSL.


See Also

...

2.8.1 Can I create my own Script Weblet?

2.8.2 How do I Format inline JavaScript for a Weblet Property?