1
tedsmith
FireFox Equivalent of a Marquee Tag?
  • 2005/9/13 17:32

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Further to my YAXS announcement here can anyone tell me whether there's a way of creating scrolling texts (like those seen using the marquee tag) that are compatable with FireFox and other non-IE browsers?

The Marquee Module uses the marquee html tag (which was created by Microsft for IE) and does not appear to be 100% compatible with FF. This is from experience and from what I've read over the last few days.

I'm thinking along the liunes of some DHTML or JavaScript. The best thing I've found so far is AJScroller by
HotScripts.com but you have to pay money to get rid of the adds which I don't want for just one scrolling list.

Thanks

Ted

2
miealex
Re: FireFox Equivalent of a Marquee Tag?
  • 2005/9/13 20:13

  • miealex

  • Just popping in

  • Posts: 96

  • Since: 2004/12/12


Check out this link. Do you notice the News on the right?

If you like it take a look at the source code and you'll see how it is done.

Cheers,
Alex

3
tedsmith
Re: FireFox Equivalent of a Marquee Tag?
  • 2005/9/13 20:18

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Yes, I am liking a great deal!! However, I can't make out how it's done when i view the source. Are you able to PM it or post it here?

I'd be much obliged!

Thanks

Ted

4
tedsmith
Re: FireFox Equivalent of a Marquee Tag?
  • 2005/9/14 19:24

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


*bump*

5
Mithrandir
Re: FireFox Equivalent of a Marquee Tag?

The "marquee" div has an ID that is used in the included JavaScript file:
http://www.mielus.ro/bughi/news_en.js
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

6
JMorris
Re: FireFox Equivalent of a Marquee Tag?
  • 2005/9/14 19:35

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


Here you go. I got this one from DynamicDrive.

<!--The following will create a cross browser compatible scrolling marquee in the page header.  Follow the directions in the code to customize the marquee.  Do not change the demensions of the marquee or the page layout will break.-->
      <
script language="JavaScript1.2">
/*
Cross browser Marquee script- © Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and Terms Of Use, visit http://www.dynamicdrive.com
Credit MUST stay intact
*/
//Specify the marquee's width (in pixels)
var marqueewidth="345px"
//Specify the marquee's height
var marqueeheight="18px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=2
//configure background color:
var marqueebgcolor="#FFFFFF"
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=0
//Specify the marquee's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that's great):
var marqueecontent='<nobr><font face="Arial"><a href="http://mywebresource.com/" target="_self">MyWebResource is a site dedicated to providing a centralized portal to aid visitors in finding and evaluating resources for their website. Click here to visit MyWebResource now!</a></font></nobr>'
////NO NEED TO EDIT BELOW THIS LINE////////////
marqueespeed=(document.all)? marqueespeed Math.max(1marqueespeed-1//slow speed down by 1 for NS
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed0
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>')
var 
actualwidth=''
var cross_marqueens_marquee
function populate(){
if (
iedom){
cross_marquee=document.getElementByIddocument.getElementById("iemarquee") : document.all.iemarquee
cross_marquee
.style.left=parseInt(marqueewidth)+8+"px"
cross_marquee.innerHTML=marqueecontent
actualwidth
=document.alltemp.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
function scrollmarquee(){
if (
iedom){
if (
parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8))
cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+"px"
else
cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
}
else if (
document.layers){
if (
ns_marquee.left>(actualwidth*(-1)+8))
ns_marquee.left-=copyspeed
else
ns_marquee.left=parseInt(marqueewidth)+8
}
}
if (
iedom||document.layers){
with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
if (
iedom){
write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden">')
write('<div style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')
write('<div id="iemarquee" style="position:absolute;left:0px;top:0px"></div>')
write('</div></div>')
}
else if (
document.layers){
write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee" bgColor='+marqueebgcolor+'>')
write('<layer name="ns_marquee2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>')
write('</ilayer>')
}
document.write('</td></table>')
}
}
</
script>


Enjoy!

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

Login

Who's Online

212 user(s) are online (121 user(s) are browsing Support Forums)


Members: 1


Guests: 211


kenaanna,

more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits