PDA

View Full Version : Cross Browser marquee - no lead-in please?



Talvenloppu
07-17-2008, 08:41 PM
Cross Browser marquee

http://www.dynamicdrive.com/dynamicindex2/cmarquee.htm

I want to get the marquee to begin with a "box/marquee" of text rather than an empty "box/marquee". I've tried playing with the code ... :/ (not having a clue, just guesswork and trial and error!!) And although I can get it to do what I want in FF3 (by deleting (marqueewidth) from the populate function) the ticker text then vanishes completely in IE7 !!!! :( B****y Mr Gates LoL

Is it possible??

Robin

molendijk
07-17-2008, 09:00 PM
Replace
function populate(){
if (iedom){
cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
cross_marquee.innerHTML=marqueecontent
actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
}
else if (document.layers){
ns_marquee=document.ns_marquee.document.ns_marquee2
ns_marquee.left=parseInt(marqueewidth)+8
ns_marquee.document.write(marqueecontent)
ns_marquee.document.close()
actualwidth=ns_marquee.document.width
}
lefttime=setInterval("scrollmarquee()",20)
}
window.onload=populate with
function populate(){
if (iedom){
cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
//cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
cross_marquee.innerHTML=marqueecontent
actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
}
else if (document.layers){
ns_marquee=document.ns_marquee.document.ns_marquee2
//ns_marquee.left=parseInt(marqueewidth)+8
ns_marquee.document.write(marqueecontent)
ns_marquee.document.close()
actualwidth=ns_marquee.document.width
}
lefttime=setInterval("scrollmarquee()",20)
}
window.onload=populate.
===
Arie Molendijk

Talvenloppu
07-18-2008, 07:06 AM
Unbelievable!! Amazing!!! :D Thanks ... (I'd shove in more smilies in but they don't seem to work!) :))) Thank you very much indeed :)

Robin

Talvenloppu
07-18-2008, 07:22 AM
Oops Arie ..... :( it works great but it only removes the trailing space at the beginning of the ticker.

When the ticker starts there is no blank space, but when it ends there is. I want to get a continuous loop of text without it either trailing away at the end or trailing on at the beginning.

jscheuer1
07-18-2008, 08:27 AM
Use this one:

http://home.comcast.net/~jscheuer1/side/marqueeh.htm

It is continuous, and has as a configuration option:


//Specify start with Full(1)or Empty(0) Marquee
var full=0


Set that to 1. For the full source code, use your browser's 'view source' to get the code.

Talvenloppu
07-18-2008, 07:00 PM
Thanks! :) Works a treat

saturnprods
08-25-2008, 05:46 PM
Use this one:

http://home.comcast.net/~jscheuer1/side/marqueeh.htm

It is continuous, and has as a configuration option:


//Specify start with Full(1)or Empty(0) Marquee
var full=0


Set that to 1. For the full source code, use your browser's 'view source' to get the code.

Hi jscheuer1,

This works great. The only thing is I have noticed that in IE, it takes about 8 seconds to start up. In Safari it starts up instantly.

Do you know why this is?

Thanks

Talvenloppu
08-25-2008, 06:49 PM
Just to say that I don't experience that lag in IE7 - I have the delay set to 3 seconds and that's exactly the time taken for the next image to show.