window.onscroll and firefox

Discussion in 'Javascript' started by Simon Wigzell, Sep 1, 2005.

  1. Looks like firefox doesn't support onscroll. Any workaround?
    Simon Wigzell, Sep 1, 2005
    #1
    1. Advertising

  2. Simon Wigzell wrote :
    > Looks like firefox doesn't support onscroll. Any workaround?
    >
    >


    Not true. Firefox support scroll event as specified by DOM 2 Events
    (document) and DOM 3 Events (element).

    Gérard
    --
    remove blah to email me
    Gérard Talbot, Sep 1, 2005
    #2
    1. Advertising

  3. "Gérard Talbot" <> wrote in message
    news:...
    > Simon Wigzell wrote :
    >> Looks like firefox doesn't support onscroll. Any workaround?
    >>
    >>

    >
    > Not true. Firefox support scroll event as specified by DOM 2 Events
    > (document) and DOM 3 Events (element).
    >
    > Gérard
    > --
    > remove blah to email me


    Well - then why does the following work (you get the alert when you move the
    scroll bar) for IE, Netscape and Opera but not firefox?

    <html>
    <body>
    <script language="JavaScript1.2">
    window.onscroll = doOnScroll;

    function doOnScroll()
    {
    alert("doOnScroll");
    }
    </script>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    <p>content</p>
    </body>
    </html>
    Simon Wigzell, Sep 1, 2005
    #3
  4. Simon Wigzell

    Lee Guest

    Simon Wigzell said:
    >
    >
    >"Gérard Talbot" <> wrote in message
    >news:...
    >> Simon Wigzell wrote :
    >>> Looks like firefox doesn't support onscroll. Any workaround?
    >>>
    >>>

    >>
    >> Not true. Firefox support scroll event as specified by DOM 2 Events
    >> (document) and DOM 3 Events (element).
    >>
    >> Gérard
    >> --
    >> remove blah to email me

    >
    >Well - then why does the following work (you get the alert when you move the
    >scroll bar) for IE, Netscape and Opera but not firefox?
    >
    ><html>
    ><body>
    ><script language="JavaScript1.2">


    You're specifically telling it to only load the code in browsers
    that are running Javascript version 1.2. That's not a good idea.

    <script type="text/javascript">
    Lee, Sep 1, 2005
    #4
  5. Simon Wigzell wrote :
    > "Gérard Talbot" <> wrote in message
    > news:...
    >
    >>Simon Wigzell wrote :
    >>
    >>>Looks like firefox doesn't support onscroll. Any workaround?
    >>>



    Use DOM 2 Events methods:

    http://www.gtalbot.org/BugzillaSection/Bug189308_ScrollEvent.html

    Bug 35011, bug 189308, bug 144868 and several others related to
    scrolling have been fixed too.
    https://bugzilla.mozilla.org/show_bug.cgi?id=35011
    https://bugzilla.mozilla.org/show_bug.cgi?id=189308
    https://bugzilla.mozilla.org/show_bug.cgi?id=144868

    DOM 3 Events interactive example (scroll event for element):
    http://www.mozilla.org/docs/dom/domref/scrollTop.html#Example

    Gérard
    --
    remove blah to email me
    Gérard Talbot, Sep 2, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    5,843
  2. Sam
    Replies:
    2
    Views:
    2,856
    IT Guy
    Sep 29, 2006
  3. Mark Szlazak
    Replies:
    1
    Views:
    138
    Mark Szlazak
    Mar 30, 2005
  4. Simon Wigzell

    Firefox onscroll

    Simon Wigzell, Sep 27, 2005, in forum: Javascript
    Replies:
    1
    Views:
    100
    Stephen Chalmers
    Sep 28, 2005
  5. Jeremy

    Firefox, textarea and onscroll

    Jeremy, Jul 6, 2006, in forum: Javascript
    Replies:
    1
    Views:
    86
    Martin Honnen
    Jul 6, 2006
Loading...

Share This Page