|
|
#1 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Sep 2004
12 posts
Gave thanks: 0
Thanked 0 times
|
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. |
|
|
|
|
|
#2 (permalink) |
|
I'm Dope as Crack
Resident.
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.
__________________
|
|
|
|
|
|
#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 |
|
|
|
|
|
#4 (permalink) |
|
I'm Dope as Crack
Resident.
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
__________________
|
|
|
|
|
|
#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 |
|
|
|
|
|
#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 |
|
|
|
|
|
#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 |
|
|
|
|
|
#8 (permalink) | |
|
ma
Comfy Contributor
Joined in Aug 2004
Lives in da beach
254 posts
Gave thanks: 0
Thanked 0 times
|
Quote:
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 |
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|