Predicitive input

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

    Predicitive input

    Is it possible to modify a HTML list box properties so that it doesn't
    scroll to the letter pressed. I have created a bit of code to allow the
    list box to scroll to the the first 5 characters entered. Ie if the
    user selects the list box and types 'compu' the listbox will scroll to
    'Computer'. My problem is with the default behaviour of the listbox.
    After the 'computer' option is selected the listbox moves to a word
    begining with 'u' my last entered character. Is there anyway arround
    this? My code is executed on the keyup event on the listbox <select
    size="5" multiple="true" id="b" onkeyup="DoSele ct()">.


    --
    Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
  • kaeli

    #2
    Re: Predicitive input

    In article <d9eca1c47ee027 1877eb9a704813b 196.35643@mygat e.mailgate.org> ,
    helloclive@hotm ail.com enlightened us with...[color=blue]
    > Is it possible to modify a HTML list box properties so that it doesn't
    > scroll to the letter pressed. I have created a bit of code to allow the
    > list box to scroll to the the first 5 characters entered. Ie if the
    > user selects the list box and types 'compu' the listbox will scroll to
    > 'Computer'. My problem is with the default behaviour of the listbox.
    > After the 'computer' option is selected the listbox moves to a word
    > begining with 'u' my last entered character. Is there anyway arround
    > this? My code is executed on the keyup event on the listbox <select
    > size="5" multiple="true" id="b" onkeyup="DoSele ct()">.
    >
    >
    >[/color]

    I'm sure there is, but unless this is for an intranet application, it's
    a Bad Idea to change the default behavior of a component. Usability
    studies show that once we actually get people used to things, they
    really don't like it when you change the behavior of that thing.
    It's kind of like teaching someone to drive, then changing the gas pedal
    to the left and the brake to the right. ;)

    If you still want to do it, cancel the event according to the browser of
    choice. Netscape and IE do it a bit differently.

    --
    --
    ~kaeli~
    With her marriage, she got a new name and a dress.



    Comment

    • McKirahan

      #3
      Re: Predicitive input

      "Clive Moore" <helloclive@hot mail.com> wrote in message
      news:d9eca1c47e e0271877eb9a704 813b196.35643@m ygate.mailgate. org...[color=blue]
      > Is it possible to modify a HTML list box properties so that it doesn't
      > scroll to the letter pressed. I have created a bit of code to allow the
      > list box to scroll to the the first 5 characters entered. Ie if the
      > user selects the list box and types 'compu' the listbox will scroll to
      > 'Computer'. My problem is with the default behaviour of the listbox.
      > After the 'computer' option is selected the listbox moves to a word
      > begining with 'u' my last entered character. Is there anyway arround
      > this? My code is executed on the keyup event on the listbox <select
      > size="5" multiple="true" id="b" onkeyup="DoSele ct()">.
      >
      >
      > --
      > Posted via Mailgate.ORG Server - http://www.Mailgate.ORG[/color]

      Here's something I found and adapted for my use:

      // Cooking with JavaScript & DHTML
      // Bonus Recipe: Typing select Element Choices in IE for Windows
      // http://www.oreillynet.com/pub/a/java...nygoodman.html
      // http://www.oreillynet.com/lpt/a/4135


      Comment

      • Dennis Marks

        #4
        Re: Predicitive input

        In article
        <d9eca1c47ee027 1877eb9a704813b 196.35643@mygat e.mailgate.org> , Clive
        Moore <helloclive@hot mail.com> wrote:
        [color=blue]
        > Is it possible to modify a HTML list box properties so that it doesn't
        > scroll to the letter pressed. I have created a bit of code to allow the
        > list box to scroll to the the first 5 characters entered. Ie if the
        > user selects the list box and types 'compu' the listbox will scroll to
        > 'Computer'. My problem is with the default behaviour of the listbox.
        > After the 'computer' option is selected the listbox moves to a word
        > begining with 'u' my last entered character. Is there anyway arround
        > this? My code is executed on the keyup event on the listbox <select
        > size="5" multiple="true" id="b" onkeyup="DoSele ct()">.[/color]

        Why not have a separate input box below the select list where you enter
        the search term. Do the onkeyup="DoSele ct() in the input box.

        --
        Dennis Marks

        To reply change none to dcsi.


        -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
        http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
        -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

        Comment

        • Clive Moore

          #5
          Re: Predicitive input



          Thanks for your reply. This is what ive been looking for.
          Clive



          --
          Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

          Comment

          Working...