|
EXAMPLE
Wait 5 seconds for the banner to change.
1) Insert this script in the <BODY> section where you want the image
swapping rotator
to appear in the page.
2) Define the swapping images, the links
and the HTML to
appear with the images in this section of the script:
var ads = new adArray(
"images/banner_1.gif","http://planmagic.com",
"images/banner_2.gif","http://simplythebest.net",
"images/banner_3.gif","http://simplythebest.net/scripts/");
var ad_num = getAdNum();
document.write('<CENTER><TABLE CELLPADDING=0 CELLSPACING=1 BORDER=0><TR><TD '
+'ALIGN=CENTER><FONT SIZE=2 FACE=Arial><B>SimplytheBest DHTML Scripts & JavaScripts is sponsored by:
'
+'</FONT></TD><TR></TR><TD><A HREF="'+ads[ad_num].href+'"><IMG
SRC="'+ads[ad_num].src+'" '
+'WIDTH="468" HEIGHT="60" BORDER=0 name=js_ad></A></TD></TR></TABLE></CENTER>');
3) Choose how fast you want your images to
swap in this section of the script:
setTimeout("rotateSponsor()",5000);
// the default is a new image every 5 seconds
See also
Rotation CGI scripts
|