file with extension .js (without the <SCRIPT>
tag pair), and called by <SCRIPT src="scriptname.js">
Text is always included into quotation marks. If you want to insert quotation marks or other speciual characters into text, you use the backslash. \" is displayed as ". \& creates an ampersand, \\ a backslash, \' a single quote, and \n a new line. There are some others too.
To write something on the text, use document.write("some text here"). Then there are dialog boxes which you activate by using alert("some text") or confirm("sometext") or prompt("some text","default value"). The second one has to buttons ("OK" and "cancel"), is of type Boolean and becomes true if the user clicks "OK". The third one prompts you for some input. Here are examples.
The whole rest of the line after // is disregarded. If you need comments of more than one line, include it between /* and */
See the separate page here for more detailed information.
With events usually you trigger functions, like in onMouseOver="function1()".
txt="There was an error on this page.\n\n Error Description: "+ err.description + "\n\n Click OK to continue.\n\n"
You can throw an exception, using the throw command.
Erich Prisner, December 2003