Smart Select Boxes

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

    Smart Select Boxes

    Hello.
    Does anyone know if there is a way to select an item in a select box by
    typing the beginning of the word and it finds it in the list?
    As an example:
    Say I want to go to the item named "M1234" in the list.
    When I type M it goes to the first "M" item.
    When I type 1 it goes to the first "1" item.
    Is there a way to make it go to the first "M1" item instead of jumping back
    to the "1" item?
    Is it even possible to do this in classic ASP?
    Thanks for any help.


  • Bob Barrows

    #2
    Re: Smart Select Boxes

    Bob wrote:[color=blue]
    > Hello.
    > Does anyone know if there is a way to select an item in a select box
    > by typing the beginning of the word and it finds it in the list?
    > As an example:
    > Say I want to go to the item named "M1234" in the list.
    > When I type M it goes to the first "M" item.
    > When I type 1 it goes to the first "1" item.
    > Is there a way to make it go to the first "M1" item instead of
    > jumping back to the "1" item?
    > Is it even possible to do this in classic ASP?[/color]

    No. ASP is server-side code. What you want is only possible in client-side
    code.
    Here is a demo showing one way to do it:

    Scroll down to the Dynamic Listbox demo.

    Followups should go to a client-side coding newsgroup such as .scripting.*
    or one of the newsgroups with "dhtml" in their names.

    HTH,
    Bob Barrows

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Comment

    • Aaron Bertrand - MVP

      #3
      Re: Smart Select Boxes

      You can see some other examples here:




      "Bob" <bob.lynch@enge l-ec.com#1> wrote in message
      news:u$jB7UerDH A.1488@TK2MSFTN GP12.phx.gbl...[color=blue]
      > Hello.
      > Does anyone know if there is a way to select an item in a select box by
      > typing the beginning of the word and it finds it in the list?
      > As an example:
      > Say I want to go to the item named "M1234" in the list.
      > When I type M it goes to the first "M" item.
      > When I type 1 it goes to the first "1" item.
      > Is there a way to make it go to the first "M1" item instead of jumping[/color]
      back[color=blue]
      > to the "1" item?
      > Is it even possible to do this in classic ASP?
      > Thanks for any help.
      >
      >[/color]


      Comment

      • Aaron Bertrand - MVP

        #4
        Re: Smart Select Boxes

        Whoops. I misread the question.


        "Bob" <bob.lynch@enge l-ec.com#1> wrote in message
        news:u$jB7UerDH A.1488@TK2MSFTN GP12.phx.gbl...[color=blue]
        > Hello.
        > Does anyone know if there is a way to select an item in a select box by
        > typing the beginning of the word and it finds it in the list?
        > As an example:
        > Say I want to go to the item named "M1234" in the list.
        > When I type M it goes to the first "M" item.
        > When I type 1 it goes to the first "1" item.
        > Is there a way to make it go to the first "M1" item instead of jumping[/color]
        back[color=blue]
        > to the "1" item?
        > Is it even possible to do this in classic ASP?
        > Thanks for any help.
        >
        >[/color]


        Comment

        Working...