Howto:
Insert javascripts into your HTML documents
General
No some general instrcutions for the setup of my JavaScripts for your website. It's recommendable to store the scripts in a seperate directory. At first you must link the script in the head of your HTML document, than it will loaded before the HTML page will rendered. The code shoul look like this:
<script src="path/name" language="JavaScript" type="text/javascript"> </script>
path must replaced by the name of the directory, in which the script is stored,
name must replaced with the filename of the script, naturally.
Should more then one script used in one HTML document, you need one of these entries for every script.
Call/use a Javascript
There exists two possibilities to call a script(-function). The first one is to call a function through an event handler: (f.e. onClick="JavascriptFunction()" or OnMouseOver="JavascriptFunction()" at an Image or Button)
This method ist documented at the scripts, which uses this.
The second method is to call the script on this place, where it's needed. This works as follows:
<script language="Javascript" type="text/javascript"> name_of_function (parameter, para...); </script>
Here you can call also functions from different scripts inside one html scriptcontainer.
parameter at function call
On some of my scripts is it necessary (or possible) to change the functions behavoir by parameters at start. That works at follows:
function (parameter, parameter, parameter)
Enter the parameters between the braces, seperated by comma. There are two kinds of parameters: strings (text) and numbers. The follwing example shows you a function call with both types.
function(12,'text','12')
Here were 3 parameters given. The first is a normal number. The second is a string. strings will allway enclosed by two apostrophs. Because the third paramter is also enclosed by two apostrophs, it will handled as a string.
If you want to let free a a parameter, just enclose a space by two apostrophs.
Therefore again an example:
function(' ',' ','12')