TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 346
  • Total: 346

Rotating Banners

Started by RebelRose, August 23, 2006, 09:45:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Rebecca

Hi Guys,

Does anyone have a fix for this to work on FF?

Cheers :)

IchBin

#31
I don't know javascript very well, but try replacing this function:
function bannerRotate() {

if(myCount > bannerArray.length-1){myCount=0;}

// Write out rotation
if (document.all){ // it is IE
document.all.l3.innerHTML=bannerArray[myCount];
}

else if (document.layers){ // it is NN

document.layers.l1.document.layers.l2.document.open();
document.layers.l1.document.layers.l2.document.write(bannerArray[myCount]);
document.layers.l1.document.layers.l2.document.close();
}
setTimeout("bannerRotate()", 3000);
myCount++;
}



If that doesn't work, I don't know what to tell you.
with this code;
function bannerRotate() {
    if(myCount > bannerArray.length-1){myCount=0;}
        document.getElementById("l3").innerHTML=bannerArray[myCount];
        setTimeout("bannerRotate()", 3000);
        myCount++;
}

Rebecca

Hi IchBin,

Doesnt work in either IE or FF. Thanks for trying, appreciate it :)

IchBin

Since I don't have the images nor the setup to trouble shoot this, if you'd like some help I'll need to look at it on your site. PM me a temp admin account if you'd like some help.

Rebecca

IchBin,

Just pm'd you. Thank you  :)

IchBin

Ok, that should be fixed. It appears they were using an "L" in the "l3" id. I was using a "1". :) The code above should work for everyone else as well.

Rebecca

IchBin,

Awesome they look great! Thank you so very much for your help. I really appreciate it! Thank you!!

jdvarner

Nice. Got it working good. Is it possible to also have it start random as well with the rotation. vs just going in order everytime?

Itch

That would be a completely different script. This is just a rotation banner, not a random banner. If you'd like that, I'm sure you could find something with a google search. Bring the script here, and we can help possibly.

phpshiva

This doesent work for me if i want that to add in a block and take html javascript whit new install of TP 1.075 the script doesent work at any java code i use in there

This website is proudly hosted on Crocweb Cloud Website Hosting.