![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 68 Pomógł: 0 Dołączył: 16.03.2004 Ostrzeżenie: (0%) ![]() ![]() |
Mam taki skrypcik, ktory staram sie przerobic aby nie wyrzycal bledow podczas validacji, ale slabo u mnie z JS i nie moge sobie poradzic z paroma rzeczami. Oto skrypt:
Kod <script type="text/javascript"> var marqueewidth="150px" var marqueeheight="55px" var marqueespeed=1 var pauseit=1 var marqueecontent='Ostatni update miał miejsce: 20-08-2004, czyli 2dni temu.' marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) var copyspeed=marqueespeed var pausespeed=(pauseit==0)? copyspeed: 0 var iedom=document.all||document.getElementById var actualheight='' var cross_marquee, ns_marquee function populate() { if(iedom){ cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee cross_marquee.style.top=parseInt(marqueeheight)+8+"px" cross_marquee.innerHTML=marqueecontent actualheight=cross_marquee.offsetHeight } else if(document.layers){ ns_marquee=document.ns_marquee.document.ns_marquee2 ns_marquee.top=parseInt(marqueeheight)+8 ns_marquee.document.write(marqueecontent) ns_marquee.document.close() actualheight=ns_marquee.document.height } lefttime=setInterval("scrollmarquee()",50) } window.onload=populate function scrollmarquee() { if (iedom){ if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8)) cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px" else cross_marquee.style.top=parseInt(marqueeheight)+8+"px" } else if (document.layers){ if (ns_marquee.top>(actualheight*(-1)+8)) ns_marquee.top-=copyspeed else ns_marquee.top=parseInt(marqueeheight)+8 } } if (iedom||document.layers){ with (document){ if (iedom){ document.write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">') document.write('<div id="iemarquee" style="position:absolute;left:0px;width:100%;"></div>') document.write('</div>') } else if (document.layers){ document.write('<div style="width:'+marqueewidth+';height:'+marqueeheight+'">') document.write('<div style="width:'+marqueewidth+';height:'+marqueeheight+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></div>') document.write('</div>') } } } </script> Oto bledy ktore nie moge wyeliminowac: Kod 1. there is no attribute "onMouseover" ...eight+';overflow:hidden" onMouseover="copyspeed=pausespeed" onMouseout="copys 2. there is no attribute "onMouseout" ...er="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">') 3. document type does not allow element "div" here ..." onMouseout="copyspeed=marqueespeed">') 4. document type does not allow element "div" here ...queewidth+';height:'+marqueeheight+'">') Rozumiem o co chodzi, ale nie umiem tego skryptu jakos przerobic. Za wszelka pomoc wielkie dzieki. Pozdrawiam -------------------- || Windows 2000 || Apache 2.0.48 || PHP 4.3.6 ||
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 20.08.2025 - 14:25 |