snake_eyes097
07-08-2003, 08:45 PM
Hey all. On my site, I am trying to link to one of my favorite sites using a banner rotater to display a random banner. However, the image for the banner won't show up, even though it is the right target, and instead of taking you to www.homestarrunner.com, it tries to insert my URL first, so you get taken to http://www.geocities.com/arashikage097/"http://www.homestarrunner.com"
I'm really not good with Java yet, and I got this code from JavaScript Source Free Javascript. I tried changing some stuff, but couldn't get it working. The shortened code looks like this:
<!-- Begin
var how_many_ads = 5;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
if (ad==1) {
txt="Homestar Runner";
url="http://www.homestarrunner.com";
alt="Everybody! Everybody!";
banner="sbbanner0001.gif";
width="468";
height="60";
}
!!!!!!!!!THERE ARE FOUR OTHER BANNERS LISTED HERE, WRITTEN THE SAME WAY AS THE ONE ABOVE!!!!!!!!!!
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>
Sorry for the length of this message. If anyone can help me, I would really appreciate it.
Thanx,
Snake_Eyes097
I'm really not good with Java yet, and I got this code from JavaScript Source Free Javascript. I tried changing some stuff, but couldn't get it working. The shortened code looks like this:
<!-- Begin
var how_many_ads = 5;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
if (ad==1) {
txt="Homestar Runner";
url="http://www.homestarrunner.com";
alt="Everybody! Everybody!";
banner="sbbanner0001.gif";
width="468";
height="60";
}
!!!!!!!!!THERE ARE FOUR OTHER BANNERS LISTED HERE, WRITTEN THE SAME WAY AS THE ONE ABOVE!!!!!!!!!!
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>
Sorry for the length of this message. If anyone can help me, I would really appreciate it.
Thanx,
Snake_Eyes097