![]() |
| ||
| Javascript not working in firefox or Safari Hello, can anybody help me in getting this code running also in firefox and safari. The goal is to display images scrolling from right to left on my screen ... Here is the code I use : <script language="JavaScript1.2"> //Specify the slider's width (in pixels) var sliderwidth=840 //Specify the slider's height (in pixels, pertains only to NS) var sliderheight=35 //Specify the slider's scroll speed (larger is faster) var slidespeed=2 //Specify the slider's images var leftrightslide=new Array() var finalslide='' leftrightslide[0]='<img src="sponsers/sponsors.gif" border=0> ' leftrightslide[1]='<img src="sponsers/sponsor1.gif" border=0> ' leftrightslide[2]='<img src="sponsers/sponsors.gif" border=0> ' //leftrightslide[3]='<a href="http://www.copycopy.be" target="_blank" title="Copy-Copy BVBA"><img src="sponsers/sponsor0.gif" border=0></a> '' //leftrightslide[4]='<a href="http://www.antwerpen.be" target="_blank" title="Antwerp"><img src="sponsers/tstad.gif" border=0></a> ' ///////do NOT edit pass this line//////////////////////////////////// var copyspeed=slidespeed //copy contents of leftrightslide into one variable for (i=0;i<leftrightslide.length;i++) finalslide=finalslide+leftrightslide[i]+" " if (document.all){ //dynamically write out the marquee tag document.write('<marquee id="ieslider" scrollAmount=0 style="width:'+sliderwidth+'">'+finalslide+'</marquee>') //stop marquee when mouse is over it ieslider.onmouseover=new Function("ieslider.scrollAmount=0") //re-enable marquee when mouse is out ieslider.onmouseout=new Function("if (document.readyState=='complete') ieslider.scrollAmount=slidespeed")} function regenerate(){window.location.reload()} function regenerate2(){if (document.layers){ document.ns_slider01.visibility="show" setTimeout("window.onresize=regenerate",450) intializeleftrightslide()} if (document.all) ieslider.scrollAmount=slidespeed} //NS specific function for initializing slider upon page load function intializeleftrightslide(){ document.ns_slider01.document.ns_slider02.document.write('<nobr>'+finalslide+'</nobr>') document. ns_slider01.document.ns_slider02.document.close() thelength=document.ns_slider01.document.ns_slider02.document.width scrollslide()} //NS specific function for sliding slideshow function scrollslide(){if (document.ns_slider01.document.ns_slider02.left>=thelength*(-1)){ document.ns_slider01.document.ns_slider02.left-=slidespeed setTimeout("scrollslide()",100)} else{document.ns_slider01.document.ns_slider02.left=sliderwidth scrollslide()}} window.onload=regenerate2 //--> </script> thank you for any reaction ... best regards, Luc |
| All times are GMT -4. The time now is 4:42 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC