Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Problem with FF and "Cursor Trailer Text"

  1. #1
    Join Date
    Apr 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Problem with FF and "Cursor Trailer Text"

    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

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default Cursor Trail Text All

    For Cursor Trail Text All just substitute this for the main script:
    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>
    Overflow Handling is shot (scrollbars act oddly but, not so badly) in FF & NS6+, otherwise, works fine.
    Last edited by jscheuer1; 04-03-2005 at 05:56 PM.

  3. #3
    Join Date
    Apr 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Many thanks, now works fine in IE and FF....
    Thanks again
    Yves

  4. #4
    Join Date
    Apr 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by jscheuer1
    Overflow Handling is shot (scrollbars act oddly but, not so badly) in FF & NS6+, otherwise, works fine.
    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.

  6. #6
    Join Date
    Apr 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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:
    Code:
    <body onLoad="makesnake()" style="width:99%!important;width:100%;height:98%!important;height:'';overflow-x:hidden;overflow-y:scroll">
    and in the script, right after:
    Code:
    if ((document.getElementById)&&(!document.all)){
            var thisspan = eval("document.getElementById('span"+(i)+"').style")
    stick this in:
    Code:
    if (window.innerWidth){
    if (xpos[i]>window.innerWidth-30)
    thisspan.display='none'
    else
    thisspan.display='block'
    }
    I had fun, enjoy!
    Last edited by jscheuer1; 04-06-2005 at 02:08 AM.

  8. #8
    Join Date
    Apr 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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?

  10. #10
    Join Date
    Apr 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •