lady6120
Joined: 29 May 2007 Posts: 1
|
Posted: Tue May 29, 2007 9:47 pm Post subject: Need help with random banner link opening in new page |
|
|
Hi, I need help with a random banner link opening in a new browser page.
Currently, my code is as follows, but I have to be missing something. Please help ASAP!
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var how_many_ads = 2;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
if (ad==1) {
url="http://www.4ourfam.com";
banner="http://www.houstonsahm.com/ads/MomTeambanner.gif";
width="500";
height="78";
}
if (ad==2) {
url="http://www.sandys.tohe.com";
banner="http://www.houstonsahm.com/ads/TasteOfHomebanner.gif";
width="500";
height="78";
}
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> |
|