Capturing scroll bar usage on textarea

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • konryd

    Capturing scroll bar usage on textarea

    I want to know when a user scrolls the textarea. Since there is no
    such an event, I need to scroll all the ways scrolling might be
    invoked, that is:
    * by pressing keys
    * by moving mouse
    * by drag'n'dropping the scroll bar

    First two are easy to implement, but the third one doesn't trigger
    even document.onmous edown
    I investigated on firefox and safari under osx.
    Any ideas? Or at least firm confirmation that it cannot be
    accomplished?

    Konrad
  • Joost Diepenmaat

    #2
    Re: Capturing scroll bar usage on textarea

    konryd <konryd@gmail.c omwrites:
    I want to know when a user scrolls the textarea. Since there is no
    such an event, I need to scroll all the ways scrolling might be
    invoked, that is:
    * by pressing keys
    * by moving mouse
    * by drag'n'dropping the scroll bar
    >
    First two are easy to implement, but the third one doesn't trigger
    even document.onmous edown
    I investigated on firefox and safari under osx.
    Any ideas? Or at least firm confirmation that it cannot be
    accomplished?
    I haven't tried this with textareas, but the onscroll event works in
    the popular browsers on elements with style overflow: scroll / auto.

    --
    Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/

    Comment

    • Bjoern Hoehrmann

      #3
      Re: Capturing scroll bar usage on textarea

      * konryd wrote in comp.lang.javas cript:
      >I want to know when a user scrolls the textarea. Since there is no
      >such an event, I need to scroll all the ways scrolling might be
      >invoked, that is:
      What is wrong with the 'scroll' event? An <textarea onscroll='...'>
      certainly works for me in Internet Explorer, perhaps you missed this
      event?
      --
      Björn Höhrmann · mailto:bjoern@h oehrmann.de · http://bjoern.hoehrmann.de
      Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
      68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/

      Comment

      • Thomas 'PointedEars' Lahn

        #4
        Re: Capturing scroll bar usage on textarea

        Bjoern Hoehrmann wrote:
        * konryd wrote in comp.lang.javas cript:
        >I want to know when a user scrolls the textarea. Since there is no
        >such an event, I need to scroll all the ways scrolling might be
        >invoked, that is:
        >
        What is wrong with the 'scroll' event?
        That it is proprietary.
        An <textarea onscroll='...'>
        You of all people should know that this is invalid HTML.
        certainly works for me in Internet Explorer,
        I wonder how you of all people could even think about advocating
        invalid HTML just to satisfy Internet Explorer users.
        perhaps you missed this event?
        Perhaps he was thinking more clearly than you do now.


        PointedEars
        --
        Use any version of Microsoft Frontpage to create your site.
        (This won't prevent people from viewing your source, but no one
        will want to steal it.)
        -- from <http://www.vortex-webdesign.com/help/hidesource.htm>

        Comment

        • Bjoern Hoehrmann

          #5
          Re: Capturing scroll bar usage on textarea

          * Thomas 'PointedEars' Lahn wrote in comp.lang.javas cript:
          >Bjoern Hoehrmann wrote:
          >* konryd wrote in comp.lang.javas cript:
          >>I want to know when a user scrolls the textarea. Since there is no
          >>such an event, I need to scroll all the ways scrolling might be
          >>invoked, that is:
          >>
          >What is wrong with the 'scroll' event?
          >
          >That it is proprietary.
          It's actually part of the HTML Events in DOM Level 2 Events. I indeed
          neglected to mention that the onscroll attribute is not part of HTML4
          and derived formats, thank you for adding that information.
          --
          Björn Höhrmann · mailto:bjoern@h oehrmann.de · http://bjoern.hoehrmann.de
          Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
          68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/

          Comment

          • Thomas 'PointedEars' Lahn

            #6
            Re: Capturing scroll bar usage on textarea

            Bjoern Hoehrmann wrote:
            * Thomas 'PointedEars' Lahn wrote in comp.lang.javas cript:
            >Bjoern Hoehrmann wrote:
            >>* konryd wrote in comp.lang.javas cript:
            >>>I want to know when a user scrolls the textarea. Since there is no
            >>>such an event, I need to scroll all the ways scrolling might be
            >>>invoked, that is:
            >>What is wrong with the 'scroll' event?
            >That it is proprietary.
            >
            It's actually part of the HTML Events in DOM Level 2 Events.
            Yes, indeed! Thank you for pointing this out.
            I indeed neglected to mention that the onscroll attribute is not part of
            HTML4 and derived formats,
            However, since the `scroll' event is part of DOM Level 2 Events one can use
            EventTarget::ad dEventListener( ) (except for MSHTML where assignment to
            ..onscroll would have to suffice due to buggy attachEvent()). Great :)
            thank you for adding that information.
            You are welcome.


            PointedEars
            --
            realism: HTML 4.01 Strict
            evangelism: XHTML 1.0 Strict
            madness: XHTML 1.1 as application/xhtml+xml
            -- Bjoern Hoehrmann

            Comment

            Working...