Smart Select Boxes

Discussion in 'ASP General' started by Bob, Nov 18, 2003.

  1. Bob

    Bob Guest

    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, Nov 18, 2003
    #1
    1. Advertising

  2. Bob

    Bob Barrows Guest

    Bob wrote:
    > 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?


    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:
    http://www.thrasherwebdesign.com/index.asp?pi=links&hp=links.asp
    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.
     
    Bob Barrows, Nov 18, 2003
    #2
    1. Advertising

  3. You can see some other examples here:
    http://www.aspfaq.com/2270



    "Bob" <#1> wrote in message
    news:u$...
    > 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.
    >
    >
     
    Aaron Bertrand - MVP, Nov 18, 2003
    #3
  4. Whoops. I misread the question.


    "Bob" <#1> wrote in message
    news:u$...
    > 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.
    >
    >
     
    Aaron Bertrand - MVP, Nov 18, 2003
    #4
    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. Galina
    Replies:
    0
    Views:
    401
    Galina
    Dec 15, 2003
  2. Stefan Mueller
    Replies:
    5
    Views:
    12,527
    jamesxa
    Jun 16, 2009
  3. MotoK
    Replies:
    59
    Views:
    1,918
    Keith Thompson
    Sep 15, 2006
  4. palmiere
    Replies:
    1
    Views:
    466
    Erwin Moller
    Feb 9, 2004
  5. Select boxes to select sets

    , Sep 14, 2005, in forum: Javascript
    Replies:
    5
    Views:
    111
    Dr John Stockton
    Sep 17, 2005
Loading...

Share This Page