Loading ...
Sorry, an error occurred while loading the content.
 

autocomplete textboxKeyEvent - need access to right arrow key

Expand Messages
  • scott8g
    Hi, I m new to this group and would appreciate any help you fine people might offer. I m working with the autocomplete control and using the textboxKeyEvent to
    Message 1 of 5 , Jan 25, 2009
      Hi,

      I'm new to this group and would appreciate any help you fine people
      might offer. I'm working with the autocomplete control and using the
      textboxKeyEvent to detect left and right arrow keypresses, among
      others. My handler successfully detects left arrow and every other key
      I need except for right arrow. Does YUI intentionally prevent right
      arrow from being detected, and if so, is there some way to override
      this behavior?

      By the way, I only want to handle these keys when the autocomplete
      container is closed, so I'm checking isContainerOpen() before taking
      any actions.

      Thanks.
    • scott8g
      Hi all, I thought I would bring this post to your attention again, since it seems nobody saw it or had any ideas previously. It s really important that I find
      Message 2 of 5 , Feb 2, 2009
        Hi all,

        I thought I would bring this post to your attention again, since it
        seems nobody saw it or had any ideas previously. It's really important
        that I find a solution to this problem. I hate to say it, but if I
        can't solve this I will have to switch to a Scriptaculous solution,
        since I know I can make it work that way. I prefer the YUI
        autocomplete and I'm using YUI for just about everything else, so that
        would be an unfortunate outcome.

        Any ideas, or does anyone know someplace else I can submit this
        problem? Ive googled it, of course, but with no luck in finding an answer.

        Thanks again for your help.



        --- In ydn-javascript@yahoogroups.com, "scott8g" <scotthg@...> wrote:
        >
        > Hi,
        >
        > I'm new to this group and would appreciate any help you fine people
        > might offer. I'm working with the autocomplete control and using the
        > textboxKeyEvent to detect left and right arrow keypresses, among
        > others. My handler successfully detects left arrow and every other key
        > I need except for right arrow. Does YUI intentionally prevent right
        > arrow from being detected, and if so, is there some way to override
        > this behavior?
        >
        > By the way, I only want to handle these keys when the autocomplete
        > container is closed, so I'm checking isContainerOpen() before taking
        > any actions.
        >
        > Thanks.
        >
      • Homer Simpson
        I needed the down arrow event. This is what I did: You will see the function _onTextboxKeyDown() here:
        Message 3 of 5 , Feb 3, 2009
          I needed the down arrow event.  This is what I did:
          You will see the function _onTextboxKeyDown() here:

          http://developer.yahoo.com/yui/docs/AutoComplete.js.html

          You will notice that 3 arrow events are caught.  If the container is open, something is done.
          I needed the down arrow event when the container is closed.  Thus, all I had to do was
          move the "break;" statement that relates to down-arrow.  By moving it one line UP, the
          switch statement "falls through" and I get the event (when container is closed).

          If you know what you're doing, you can probably do something similar for right arrow.

          BTW, I made my changes in the 'min' version of the javascript file.

          hope it helps,
           
          GC

          Posted by: "scott8g" scotthg@...   scott8g

          Mon Feb 2, 2009 2:02 pm (PST)

          Hi all,

          I thought I would bring this post to your attention again, since it
          seems nobody saw it or had any ideas previously. It's really important
          that I find a solution to this problem. I hate to say it, but if I
          can't solve this I will have to switch to a Scriptaculous solution,
          since I know I can make it work that way. I prefer the YUI
          autocomplete and I'm using YUI for just about everything else, so that
          would be an unfortunate outcome.

          Any ideas, or does anyone know someplace else I can submit this
          problem? Ive googled it, of course, but with no luck in finding an answer.

          Thanks again for your help.

          --- In ydn-javascript@ yahoogroups. com, "scott8g" <scotthg@... > wrote:
          >
          > Hi,
          >
          > I'm new to this group and would appreciate any help you fine people
          > might offer. I'm working with the autocomplete control and using the
          > textboxKeyEvent to detect left and right arrow keypresses, among
          > others. My handler successfully detects left arrow and every other key
          > I need except for right arrow. Does YUI intentionally prevent right
          > arrow from being detected, and if so, is there some way to override
          > this behavior?
          >
          > By the way, I only want to handle these keys when the autocomplete
          > container is closed, so I'm checking isContainerOpen( ) before taking
          > any actions.
          >
          > Thanks.
          >

        • scott8g
          Thanks for your reply. I will give that a try. I was hoping to find a solution that doesn t involve modifying YUI code, since 1) I am currently including YUI
          Message 4 of 5 , Feb 4, 2009
            Thanks for your reply. I will give that a try.

            I was hoping to find a solution that doesn't involve modifying YUI
            code, since 1) I am currently including YUI remotely and will have to
            change that, and 2) will have to be careful to carry my changes
            forward when updated versions of YUI come available.

            Regardless, this may be at least a temporary solution. So thanks again.

            --- In ydn-javascript@yahoogroups.com, Homer Simpson <collg@...> wrote:
            >
            > I needed the down arrow event. This is what I did:
            > You will see the function _onTextboxKeyDown() here:
            >
            > http://developer.yahoo.com/yui/docs/AutoComplete.js.html
            >
            > You will notice that 3 arrow events are caught. If the container is
            open, something is done.
            > I needed the down arrow event when the container is closed. Thus,
            all I had to do was
            > move the "break;" statement that relates to down-arrow. By moving
            it one line UP, the
            > switch statement "falls through" and I get the event (when container
            is closed).
            >
            > If you know what you're doing, you can probably do something similar
            for right arrow.
            >
            > BTW, I made my changes in the 'min' version of the javascript file.
            >
            > hope it helps,
            >
            > GC
            >
            >
            > Posted by: "scott8g" scotthg@... scott8g
            > Mon Feb 2, 2009 2:02 pm (PST)
            > Hi all,
            >
            > I thought I would bring this post to your attention again, since it
            > seems nobody saw it or had any ideas previously. It's really important
            > that I find a solution to this problem. I hate to say it, but if I
            > can't solve this I will have to switch to a Scriptaculous solution,
            > since I know I can make it work that way. I prefer the YUI
            > autocomplete and I'm using YUI for just about everything else, so that
            > would be an unfortunate outcome.
            >
            > Any ideas, or does anyone know someplace else I can submit this
            > problem? Ive googled it, of course, but with no luck in finding an
            answer.
            >
            > Thanks again for your help.
            >
            > --- In ydn-javascript@ yahoogroups. com, "scott8g" <scotthg@ > wrote:
            > >
            > > Hi,
            > >
            > > I'm new to this group and would appreciate any help you fine people
            > > might offer. I'm working with the autocomplete control and using the
            > > textboxKeyEvent to detect left and right arrow keypresses, among
            > > others. My handler successfully detects left arrow and every other key
            > > I need except for right arrow. Does YUI intentionally prevent right
            > > arrow from being detected, and if so, is there some way to override
            > > this behavior?
            > >
            > > By the way, I only want to handle these keys when the autocomplete
            > > container is closed, so I'm checking isContainerOpen( ) before taking
            > > any actions.
            > >
            > > Thanks.
            > >
            >
          • berg.matt
            I have been needing to capture the down event also in order to open the autocomplete by hitting the down key. I just added my own keydown event to the
            Message 5 of 5 , Mar 25, 2009
              I have been needing to capture the down event also in order to open the autocomplete by hitting the down key. I just added my own keydown event to the original text input and just made sure I didn't conflict with the YUI event. Works fine and I didn't have to modify the YUI code.

              --- In ydn-javascript@yahoogroups.com, "scott8g" <scotthg@...> wrote:
              >
              > Thanks for your reply. I will give that a try.
              >
              > I was hoping to find a solution that doesn't involve modifying YUI
              > code, since 1) I am currently including YUI remotely and will have to
              > change that, and 2) will have to be careful to carry my changes
              > forward when updated versions of YUI come available.
              >
              > Regardless, this may be at least a temporary solution. So thanks again.
              >
              > --- In ydn-javascript@yahoogroups.com, Homer Simpson <collg@> wrote:
              > >
              > > I needed the down arrow event. This is what I did:
              > > You will see the function _onTextboxKeyDown() here:
              > >
              > > http://developer.yahoo.com/yui/docs/AutoComplete.js.html
              > >
              > > You will notice that 3 arrow events are caught. If the container is
              > open, something is done.
              > > I needed the down arrow event when the container is closed. Thus,
              > all I had to do was
              > > move the "break;" statement that relates to down-arrow. By moving
              > it one line UP, the
              > > switch statement "falls through" and I get the event (when container
              > is closed).
              > >
              > > If you know what you're doing, you can probably do something similar
              > for right arrow.
              > >
              > > BTW, I made my changes in the 'min' version of the javascript file.
              > >
              > > hope it helps,
              > >
              > > GC
              > >
              > >
              > > Posted by: "scott8g" scotthg@ scott8g
              > > Mon Feb 2, 2009 2:02 pm (PST)
              > > Hi all,
              > >
              > > I thought I would bring this post to your attention again, since it
              > > seems nobody saw it or had any ideas previously. It's really important
              > > that I find a solution to this problem. I hate to say it, but if I
              > > can't solve this I will have to switch to a Scriptaculous solution,
              > > since I know I can make it work that way. I prefer the YUI
              > > autocomplete and I'm using YUI for just about everything else, so that
              > > would be an unfortunate outcome.
              > >
              > > Any ideas, or does anyone know someplace else I can submit this
              > > problem? Ive googled it, of course, but with no luck in finding an
              > answer.
              > >
              > > Thanks again for your help.
              > >
              > > --- In ydn-javascript@ yahoogroups. com, "scott8g" <scotthg@ > wrote:
              > > >
              > > > Hi,
              > > >
              > > > I'm new to this group and would appreciate any help you fine people
              > > > might offer. I'm working with the autocomplete control and using the
              > > > textboxKeyEvent to detect left and right arrow keypresses, among
              > > > others. My handler successfully detects left arrow and every other key
              > > > I need except for right arrow. Does YUI intentionally prevent right
              > > > arrow from being detected, and if so, is there some way to override
              > > > this behavior?
              > > >
              > > > By the way, I only want to handle these keys when the autocomplete
              > > > container is closed, so I'm checking isContainerOpen( ) before taking
              > > > any actions.
              > > >
              > > > Thanks.
              > > >
              > >
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.