The "Cursor Trailer Text" script does not work with Firefox. It works with IE.
Is there any modification to works with IE AND FF ??
Yves
The "Cursor Trailer Text" script does not work with Firefox. It works with IE.
Is there any modification to works with IE AND FF ??
Yves
For Cursor Trail Text All just substitute this for the main script:Overflow Handling is shot (scrollbars act oddly but, not so badly) in FF & NS6+, otherwise, works fine.Code:<script> /* Cursor Trailor Text- By Peter Gehrig (http://www.24fun.ch/) Permission given to Dynamicdrive.com to feature script in it's archive. For full source code, installation instructions, and 1000's more DHTML scripts, visit http://dynamicdrive.com Modified in Dynamic Drive Help Forums by jscheuer1 to work in NS6+ & FF1+ */ var x,y var step=20 var flag=0 // Your snappy message. Important: the space at the end of the sentence!!! var message="DYNAMIC DRIVE! " message=message.split("") var xpos=new Array() for (i=0;i<=message.length-1;i++) { xpos[i]=-50 } var ypos=new Array() for (i=0;i<=message.length-1;i++) { ypos[i]=-50 } function handlerMM(e){ if ((document.getElementById)&&(!document.all)){ x = e.pageX y = e.pageY flag=1 } else{ x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY flag=1 } } function makesnake() { if ((flag==1 && document.all)||(flag==1 && document.getElementById)) { for (i=message.length-1; i>=1; i--) { xpos[i]=xpos[i-1]+step ypos[i]=ypos[i-1] } xpos[0]=x+step ypos[0]=y for (i=0; i<message.length-1; i++) { if ((document.getElementById)&&(!document.all)){ var thisspan = eval("document.getElementById('span"+(i)+"').style") thisspan.left=xpos[i] thisspan.top=ypos[i] } else{ var thisspan = eval("span"+(i)+".style") thisspan.posLeft=xpos[i] thisspan.posTop=ypos[i] } } } else if (flag==1 && document.layers) { for (i=message.length-1; i>=1; i--) { xpos[i]=xpos[i-1]+step ypos[i]=ypos[i-1] } xpos[0]=x+step ypos[0]=y for (i=0; i<message.length-1; i++) { var thisspan = eval("document.span"+i) thisspan.left=xpos[i] thisspan.top=ypos[i] } } var timer=setTimeout("makesnake()",30) } </script>
Last edited by jscheuer1; 04-03-2005 at 05:56 PM.
Many thanks, now works fine in IE and FF....
Thanks again
Yves
Hello jscheuer1,
Many thanks again for the correction, but ... i found that in FF (no pb in IE), if the mouse pointer is going to the right of the screen, the screen width is expanded and the Horizontal scrollbar enables to go to the right.
Is there a possibility to suppress this effect ??
Thanks
Yves
Last edited by yvesm; 04-05-2005 at 03:43 PM.
I already alerted you to this, the problem is that these Mozilla based browsers do not support the handling of overflow of content the way IE does (through a simple style declaration). It is probably possible to write a routine that will temporarily suspend the effect if the mouse gets too close to the right in those browsers. I don't have time for that right now as I am in the middle of several paid projects. I or someone will get to it sooner or later. Please be aware, I am not affiliated with DD. Frankly, I don't see it as a huge problem. And, you are most welcome for the modifications.Originally Posted by jscheuer1
Hello,
I did not take attention to your alert, sorry. It is not a show stopper.... i will monitor the subject until someone find a correction.
Anyway, many thanks for your help.
Regards
Yves
OK, so I played hooky from work and got bored, I've got it about as fixed as can be. Change the body tag to:and in the script, right after:Code:<body onLoad="makesnake()" style="width:99%!important;width:100%;height:98%!important;height:'';overflow-x:hidden;overflow-y:scroll">stick this in:Code:if ((document.getElementById)&&(!document.all)){ var thisspan = eval("document.getElementById('span"+(i)+"').style")I had fun, enjoy!Code:if (window.innerWidth){ if (xpos[i]>window.innerWidth-30) thisspan.display='none' else thisspan.display='block' }
Last edited by jscheuer1; 04-06-2005 at 02:08 AM.
Many thanks jscheuer1,
for this so fast correction. This correct completly the problem, but the background image is not displayed on the full screen (especialy in 800x600). So leaving the old <body onLoad="makesnak.... with your correction in the function makesnake(), everything is working well (except the small horizontal scrollbar, but as the screen is no more expanding, it is not a problem).
Many thanks again for your fast action.
Regards
Yves
I can't duplicate the background image thing. I tried applying a background image as style and using the body tag's 'background=' attribute. Neither one caused a problem. Are you using a different method for your background image?
Yes in 800x600, the background image is truncated on the right, in 1024x768, the truncation is not so important.
I use a css file (bgfixe.css) containing:
.bgfixe { background-attachment: fixed; background-color: #FFFFFF; background-image: url(fondbleu.gif)}
Note that fondbleu.gif is 128x128px
and the class="bgfixe" is added at the end of the
<body onLoad="makesnake()" style=".....class="bgfixe">
Thanks for your help, but this is not important...
(Excuse my english, but i am french....from the south of France)
Regards
Yves
Bookmarks