PDA

View Full Version : Error with crawler javascript



zenki209
02-26-2010, 02:01 AM
I have this website http://www.vienmaytinh.org/index.php. I am using this javascript in link :http://dynamicdrive.com/dynamicindex2/crawler/index.htm to roll left to right my product. It is totally working well on the Firefox but in the IE some computer can not display this effect or can display this effect but the content of this website is being disappear.

Thanks for your help.

jscheuer1
02-28-2010, 07:18 AM
It would probably be a good idea to validate your page:

http://validator.w3.org/

However, the page has two script errors and the placement of the marqueeInit() function is not optimal for IE 8 in standards mode. To fix the two script errors, get rid of:


<script type="text/javascript">
AC_AX_RunContent( 'id','winMediaPlayerID','codebase','http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715','type','application/x-oleobject','height','45','standby','Loading Microsoft Windows Media Player components...','width','180','classid','CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6','name','winMediaPlayer','pluginspage','http://www.microsoft.com/Windows/MediaPlayer/','src','mms://vienmaytinh.org/images/Nhac Qc/music/cuu du lieu xuan.mp3','autosize','1','autostart','0','clicktoplay','1','displaysize','1','enablecontextmenu','0','enablefullscreencontrols','1','enabletracker','1','mute',' 0','playcount','999','showcontrols','1','showaudiocontrols','1','showdisplay','0','showgotobar','0','showpositioncontrols','1','showstatusbar','1','showtracker' ,'1','url','mms://vienmaytinh.org/images/Nhac Qc/music/cuu du lieu xuan.mp3','rate','1','balance','0','currentposition','0','defaultframe','0','currentmarker','0','invokeurls','-1','baseurl','','volume','50','uimode','full','stretchtofit','-1','windowlessvideo','0','enabled','-1','fullscreen','0','samistyle','','samilang','','samifilename','','captioningid','','enableerrordialogs','0','_cx','5292','_cy','1191' ); //end AC code
</script>

and:


<script language="JavaScript" type="text/javascript">
var t=horiDiv.scrollLeft;
horiDiv2.innerHTML=horiDiv1.innerHTML;


function horiMarquee(){
if(horiDiv1.offsetWidth - horiDiv.scrollLeft <= 0)
horiDiv.scrollLeft -= horiDiv1.offsetWidth;
else
horiDiv.scrollLeft++;
}

function startHoriMarquee(){
horiTime = setInterval(horiMarquee,3);
}
function stopHoriMarquee(){
clearInterval(horiTime);
}

startHoriMarquee();
</script>

To fix the problem in IE 8, move this:


<script type="text/javascript">
marqueeInit({
uniqueid: 'mycrawler2',
style: {
'padding': '1px',
'width': '735px',
'height': '104px'
},
inc: 2, //speed - pixel increment for each iteration of this marquee's movement
mouse:'pause', //mouseover behavior ('pause' 'cursor driven' or false)
moveatleast: 2,
neutral: 150,
savedirection: true
});
</script>

to just before the closing </body> tag:


ge.length-1) pos = -1;
}
pos++;
setTimeout("scrollText('"+pos+"')",pauze);
}
scrollText(0);
</script>
<DIV class="clear"></DIV>
</div>
<script type="text/javascript">
marqueeInit({
uniqueid: 'mycrawler2',
style: {
'padding': '1px',
'width': '735px',
'height': '104px'
},
inc: 2, //speed - pixel increment for each iteration of this marquee's movement
mouse:'pause', //mouseover behavior ('pause' 'cursor driven' or false)
moveatleast: 2,
neutral: 150,
savedirection: true
});
</script>
</body>
</html>

zenki209
03-04-2010, 02:02 AM
Thanks you for your support i have fixing this like your suggestion , however , it 's still not working on IE6 +IE7 , i don't know the reason, it can not continuously (I define continuously means the this banner working without blank).

jscheuer1
03-04-2010, 02:36 AM
You have not followed my suggestions, at least not on:

http://www.vienmaytinh.org/index.php

Update the page as per my suggestions. If after that you are still having problems, let me know.