Results 1 to 2 of 2

Thread: Cursor Trailer Text

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

    Default Cursor Trailer Text

    This script has a bug where the following properties in IE6 always yield a value of zero even though the page is scrolled down from the top (and/or over from the left) of the document origins.

    document.body.scrollLeft
    document.body.scrollTop

    I did find code that alleviates the problem. However, the code I found indicates that it is a fix for running in IE6 Strict mode -- even though I was running in IE6 Transitional mode. I also modified this script so that it works in NS7 and FF1, too.

    I tried to contact the original author, but no response. What is the policy on providing enhancements to such orphan scripts?

  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

    If you searched around you probably would find where I made similar modifications (upgrade to FF and NS7.2) in response to a request in the Dynamic Drive Scripts Help section. I did not make the 'documentElement' modification as, it was not called for in that situation. If made, it should be done in such a way as to allow it to still be 'body' for those browsers and pages without doctype support. There is a fix for that, insert this function in your script:
    Code:
    function iecompattest(){
    return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
    }
    then wherever the script uses:

    document.body

    substitute:

    iecompattest()

    As for the policy on orphans, there is none I am aware of.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •