|

Automatic Page Change
An automatic page forwarding can fulfill
many functions. For example an automatic slide show
to display products or even to simply walk a user through
the reporting application. The following example loads
our home page, www.all-BI.com, automatically into the
browser after five seconds. By the way, it also accentuates
the function principle that is key in good JavaScript
structure.
<script language="Javascript">
function forward(){
location.href="http://www.all-BI.com";
}
</script>
The above snippet goes in the <head> tag.
In the <body> tag, you need to set the following:
<body onload=setTimeout('forward()',5000)">
It does not get much simpler.
previous tip | next tip
|