icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.
Old November 2nd, 2004, 10:12 AM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Sep 2004
12 posts
Gave thanks: 0
Thanked 0 times
Angry Rotating Banner Problem

So I wanna have a rotating banner on my main page, but it's not working. I put this code inside the header:

[i]<*!-- Hide from old browsers
// Copyright © 2004 Spirit Avenue, LLC
// Created by Laif(laif[at]spiritavenue.com)

var i = 1;
banner1= new Image();
banner1.src = "/banners/definition.gif";
banner2 = new Image();
banner2.src = "banners/tzzz.gif";
banner3= new Image();
banner3.src = "/banners/jadebanner.jpg";
banner4 = new Image();
banner4.src = "banners/djabeatsbanner.gif";
banner5= new Image();
banner5.src = "/banners/resonated.jpg";
banner6 = new Image();
banner6.src = "http://img78.exs.cx/img78/862/banner38.gif";

links = new Array
links[1] = "http://neblinarecords.com"
links[2] = "http://tzarism.com"
links[3] = "http://jade-foxx.com"
links[4] = "http://djabeats.com
links[5] = "http://resonatedrecords.com"
links[6] = "http://abb-d.com"

function startTime(){

var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
closeTime=hours*3600+mins*60+secs;
closeTime+=10; // How many seconds til the next rotation
Timer();

}

function Timer(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
curTime=hours*3600+mins*60+secs
if (curTime>=closeTime){
if (i < 6){ // The number 6 is the amount of banners that you have
i++;
document.banner.src = eval("banner" + i + ".src");
}
else{
i = 1;
document.banner.src = eval("banner" + i + ".src");
}
startTime();
}
else{
window.setTimeout("Timer()",1000)}

}

function clickLink(){
top.location = links[i]
}

function descript(){
window.status = description
}

// -->
</script*>


Then I added this to the opening body tag:

onLoad="startTime();">

Then this within the body:

<a onmouseover="descript(); return true;" onclick="clickLink(); return false;" onmouseout="window.status=''" href=""><img alt="" src="banners/definition.gif" border="0" name="banner"></a>

What happens is the first banner stays on indefinately. I tried editing locally, and editing online with the same results. The editor on cPanel deletes the stuff I add onto the opening body tag. Edited locally, the page has errors and the banner still won't switch. Please tell me what I'm doing wrong before I shoot this computer.
__________________
evander, "oppurtunity" does NOT have that many syllables...

domain: spiritavenue.com

server: opti

my name is Laif

Last edited by skoolafish; November 2nd, 2004 at 10:16 AM.
skoolafish is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 2nd, 2004, 1:16 PM   #2 (permalink)
I'm Dope as Crack
Resident.
 
David's Avatar
 
Joined in Mar 2004
Lives in Asheboro, NC
Hosted on Pass 7
13,036 posts
Gave thanks: 7
Thanked 29 times
where did this code come from? your problem sounds like it's a coding error, and not a cpanel one. if that's the case, i can move this to the proper forum, which will probably get better results and answers to help you solve the error.
__________________
David is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 2nd, 2004, 4:48 PM   #3 (permalink)
Registered User
Fresh Surpasser
 
Joined in Sep 2004
12 posts
Gave thanks: 0
Thanked 0 times
sorry for the delay...got it from javascriptmadeeasy.com
__________________
evander, "oppurtunity" does NOT have that many syllables...

domain: spiritavenue.com

server: opti

my name is Laif
skoolafish is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 2nd, 2004, 5:02 PM   #4 (permalink)
I'm Dope as Crack
Resident.
 
David's Avatar
 
Joined in Mar 2004
Lives in Asheboro, NC
Hosted on Pass 7
13,036 posts
Gave thanks: 7
Thanked 29 times
no problem. have you tried any other scripts? i use one on isthecoolest.net that does a random image for my header. it could be that the script you are using just doesn't work right. i'm going to move this to the java forum so it might get more traffic from java experts
__________________
David is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 3rd, 2004, 10:08 AM   #5 (permalink)
Registered User
Fresh Surpasser
 
Joined in Sep 2004
12 posts
Gave thanks: 0
Thanked 0 times
cool...i'll check out isthecoolest....thanx again
__________________
evander, "oppurtunity" does NOT have that many syllables...

domain: spiritavenue.com

server: opti

my name is Laif
skoolafish is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 4th, 2004, 2:04 PM   #6 (permalink)
Registered User
Fresh Surpasser
 
Joined in Sep 2004
12 posts
Gave thanks: 0
Thanked 0 times
hey for all interested i found a really easy solution. on cpanel go to cgi center and use entropy banner...duuuuuuuuuuuh
__________________
evander, "oppurtunity" does NOT have that many syllables...

domain: spiritavenue.com

server: opti

my name is Laif
skoolafish is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 4th, 2004, 7:03 PM   #7 (permalink)
Surpass Fan
Super #1
 
Joined in Aug 2004
Hosted on SH58
1,688 posts
Gave thanks: 6
Thanked 7 times
Entropy banner simply displays a random banner. It does not "rotate" through them, unless something has changed since I used it back in the day...
__________________
- Evan Charlton | [site] | Server - SH58
Kickersny.com is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 4th, 2004, 11:55 PM   #8 (permalink)
ma
Comfy Contributor
 
gonzo's Avatar
 
Joined in Aug 2004
Lives in da beach
254 posts
Gave thanks: 0
Thanked 0 times
Quote:
Originally Posted by Kickersny.com
Entropy banner simply displays a random banner. It does not "rotate" through them, unless something has changed since I used it back in the day...


It seems to rotate through mine here as this is what I used!


http://cafe789.com/entries.htm
__________________
Who says a dog can't surf
gonzo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On