Click to See Complete Forum and Search --> : help with banner rotate


Netta
06-30-2003, 03:26 PM
ok heres the script on my page, the first banner shows but, help they don't rotate! where am i going wrong??

<!-- ONE STEP TO INSTALL BANNER ADS:

1. Add the first code to the BODY of your HTML document -->
<!-- STEP ONE: Add the first code to the BODY of your HTML document -->
<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title></title>
</head>

<body>
<script language="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var how_many_ads = 3;
var now = new Date(06-30-2003)
var sec = now.getSeconds(3)
var ad = sec % how_many_ads;
ad +=1;2;3;
if (ad==1) {
txt="your site here";
url="http://groups.msn.com/OodlesDoodlesbyNetta/homepage.msnw";
alt="sample";
banner="http://www.msnusers.com/OodlesDoodlesbyNetta/Documents/Bannerexchange/banner1.jpg";
width="120";
height="120";
}
if (ad==2) {
txt="your site here";
url="http://groups.msn.com/OodlesDoodlesbyNetta/homepage.msnw";
alt="sample";
banner="http://www.msnusers.com/OodlesDoodlesbyNetta/Documents/Bannerexchange/banner2.jpg";
width="120";
height="120";
}
if (ad==3) {
txt="your site here";
url="http://groups.msn.com/OodlesDoodlesbyNetta/homepage.msnw";
alt="goto.com";
banner="http://www.msnusers.com/OodlesDoodlesbyNetta/Documents/Bannerexchange/banner3.jpg";
width="120";
height="120";
}
document.write('<center>');
document.write('<a href=\"' + url + '\" target=\"_top\">');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' ');
document.write('alt=\"' + alt + '\" border=0><br>');
document.write('<small>' + txt + '</small></a>');
document.write('</center>');
// End -->
</script>

<p align="center"><font size="1" face="arial, helvetica">Free
JavaScripts provided<br>
by </font><a href="http://javascriptsource.com"><font size="1"
face="arial, helvetica">The JavaScript Source</font></a> </p>

<p><!-- Script Size: 1.44 KB --></p>
</body>
</html>


thank you netta

Netta
06-30-2003, 05:40 PM
so if i use it as is......it will show a different banner each time the page opens??right??
what about when i hit refresh??

what does the secs on the clock refer to?
can i use this script with out that part?
thanks for your helping me
netta

Netta
06-30-2003, 05:44 PM
heres the link for the page:
http://www.msnusers.com/OodlesDoodlesbyNetta/Documents/Bannerexchange%2Fbanner.htm
everytime i go there only the blue banner shows up!
there are three colors, blue, pink,green.
what do you all see there??

netta

Netta
06-30-2003, 06:15 PM
ok i understand the clock sec thing,
so what do i need to do to my script for it to work right??
can i add what you posted ??ect... ok i'm blonde and have no clue!lol

thanks for taking the time to help me.
netta

Netta
07-01-2003, 12:49 PM
thank you !!!
that code worked for me!!
netta;)

tobydabrit
03-24-2006, 01:47 PM
So how do you get it to update the banner every 5 seconds, instead of when the page loads?

(Sorry if this seems like a repeat, but I realised that this was where I originally found the code.)