搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Javascript scroller not working in Firefox

  • 2 个回答
  • 8 人有此问题
  • 5 次查看
  • 最后回复者为 penn1668

more options

I have a Javascript scroller on a site that is working fine in IE but not even visible in Firefox 3.6.16. I've run the Error Console and got nothing, cleared cache and reloaded the page multiple times with no luck.

I don't write javascript so if I need to change something, please provide the code to replace it with. Thanks!

Here is the code for the script:

<script type="text/javascript"> 

		//Change script's width (in pixels)
		var marqueewidth=460
		//Change script's height (in pixels, pertains only to NS)
		var marqueeheight=20
		//Change script's scroll speed (larger is faster)
		var speed=4
		//Change script's contents
		var marqueecontents='<font face="Arial" color="#FFFFFF"><strong><big>Register NOW for the next Yoga Series - Healing Mudra Yoga! Starts April 4! See <a href="./classinfo.htm">Classes</a> page for information.</big></strong></font><background color="#00080">'
		
		if (document.all)
		document.write('<marquee scrollAmount='+speed+' style="width:'+marqueewidth+'">'+marqueecontents+'</marquee>')
		
		function regenerate(){
		window.location.reload()
		}
		function regenerate2(){
		if (document.layers){
		setTimeout("window.onresize=regenerate",450)
		intializemarquee()
		}
		}
		
		function intializemarquee(){
		document.cmarquee01.document.cmarquee02.document.write('<nobr>'+marqueecontents+'</nobr>')
		document.cmarquee01.document.cmarquee02.document.close()
		thelength=document.cmarquee01.document.cmarquee02.document.width
		scrollit()
		}
		
		function scrollit(){
		if (document.cmarquee01.document.cmarquee02.left>=thelength*(-1)){
		document.cmarquee01.document.cmarquee02.left-=speed
		setTimeout("scrollit()",100)
		}
		else{
		document.cmarquee01.document.cmarquee02.left=marqueewidth
		scrollit()
		}
		}
		
		window.onload=regenerate2
		</script>
		<ilayer width=&{marqueewidth}; height=&{marqueeheight}; name="cmarquee01"> 
		<layer name="cmarquee02"></layer></ilayer>
I have a Javascript scroller on a site that is working fine in IE but not even visible in Firefox 3.6.16. I've run the Error Console and got nothing, cleared cache and reloaded the page multiple times with no luck. I don't write javascript so if I need to change something, please provide the code to replace it with. Thanks! Here is the code for the script: <pre><nowiki><script type="text/javascript"> //Change script's width (in pixels) var marqueewidth=460 //Change script's height (in pixels, pertains only to NS) var marqueeheight=20 //Change script's scroll speed (larger is faster) var speed=4 //Change script's contents var marqueecontents='<font face="Arial" color="#FFFFFF"><strong><big>Register NOW for the next Yoga Series - Healing Mudra Yoga! Starts April 4! See <a href="./classinfo.htm">Classes</a> page for information.</big></strong></font><background color="#00080">' if (document.all) document.write('<marquee scrollAmount='+speed+' style="width:'+marqueewidth+'">'+marqueecontents+'</marquee>') function regenerate(){ window.location.reload() } function regenerate2(){ if (document.layers){ setTimeout("window.onresize=regenerate",450) intializemarquee() } } function intializemarquee(){ document.cmarquee01.document.cmarquee02.document.write('<nobr>'+marqueecontents+'</nobr>') document.cmarquee01.document.cmarquee02.document.close() thelength=document.cmarquee01.document.cmarquee02.document.width scrollit() } function scrollit(){ if (document.cmarquee01.document.cmarquee02.left>=thelength*(-1)){ document.cmarquee01.document.cmarquee02.left-=speed setTimeout("scrollit()",100) } else{ document.cmarquee01.document.cmarquee02.left=marqueewidth scrollit() } } window.onload=regenerate2 </script> <ilayer width=&{marqueewidth}; height=&{marqueeheight}; name="cmarquee01"> <layer name="cmarquee02"></layer></ilayer> </nowiki></pre>

由cor-el于修改

所有回复 (2)

more options

A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.
The helpers at that forum are more knowledgeable about web development issues.
You need to register at the mozillaZine forum site in order to post at that forum.

See http://forums.mozillazine.org/viewforum.php?f=25

more options

Thank you but this isn't my code nor is it new to the site. Its been running for years. However, it now does not appear to work in FF and it hasnt been changed. There's got to be some sort of conflict. When I researched the issue this forum came up time and time again for these types of issues. But I'll post there as well.