<script>
The script element defines the start of the scripting portion of a JIN page. The script is divided into two segments: global script and custom functions.
The global portion of the script must appear before the custom functions and is executed directly after the DOM is constructed and synchronously with the page being rendered. Attempting to manipulate the DOM and redraw the screen in the global portion of the script, therefore, is not thread-safe. The onLoad action attribute should be used instead.
The custom function portion of the script appears directly after the global section and contains custom defined functions. See Custom Functions for details.
Example
<script>
// performed on page load
var foo = 4;
// defined functions
function someFunction(aParam) {
foo = 5;
}
function someFunction2() {
for (var i = 0; i < 10; i++) {
foo++;
}
alert(foo);
}
// script after function definitions is ignored, place it above first function definition
var ignored = 'ignored';
</script>
Valid Elements
| tag | Valid Occurrences |
|---|---|
| CDATA | 0 - 1 |
Element Specific Attributes
noneValid Attributes
idTips and Tricks
For 24/7 support email support@where.com or call 888-262-1150
WHERE™ is a product from uLocate Communications, Inc. ©2007 All Rights Reserved.