Running Two (or more) Commands With
A common question we get is how to run two different commands with
onLoad<BODY onLoad="...">onLoadonLoadFor example, suppose you want to run this command when the document is loaded:
alert('Hello There!')
and you also want to run this command:
alert('Howdy!')
You can do this by putting them both in the
<BODY onLoad="alert('Hello There!'); alert('Howdy!')">
If you want to run more than two commands, just put semicolons in between all the commands. However, this tends to get messy, so it's usually a good idea to put the commands in a single function and call the function from
<SCRIPT TYPE="text/javascript">
function init()
{
alert('Hello There!');
alert('Howdy!');
}
//-->
</SCRIPT>
Then you can call
<BODY onLoad="init()">
|