Results 1 to 3 of 3

Thread: list from database when typing value

  1. #1
    Join Date
    Nov 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default list from database when typing value

    In my list box the user has to choose a product (from a of about 1000 items)
    To select the desired item the user will type the first letter(s) of the product to get values starting with the letter will display in list from the database
    (like the browser property).....is somebody help me to solve the problem

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Sounds like extra work too me. You could easily populate a select element with all 1000 items, as options, at once, in alphabetical order. Using a select box like this:

    HTML Code:
    <select size="3" multiple onkeyup="this.scrollTop=this.scrollTop+35;">
    <option>aa
    <option>aa
    <option>aa
    <option>aa
    <option>aa
    <option>aa
    <option>aa
    <option>aa
    <option>aa
    <option>aa
    <option>dd
    <option>dd
    <option>dd
    <option>dd
    <option>dd
    <option>dd
    <option>dd
    
    snip . . .
    
    <option>oo
    <option>oo
    <option>oo
    <option>oo
    <option>oo
    <option>oo
    <option>oo
    </select>
    The onkeyup event only works in FF but, it is just an embellishment. Once it has focus, the select element itself will scroll to the first entry starting with the letter of the key pressed.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Nov 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks for the code but i am looking for a list which displays items starting with the typed letter(letters),and also the list items will be from database can u help me with these problems

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •