SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Dec 2004
    Location
    wilmington
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Auto Complete Woes

    I am trying to make a search mechanism for a mysql database with a textbox that, as the user types, searches for the closest matching string in a drop down box that is populated dynamically from the db and makes it selected.

    I have seen this many times in address books; a user starts to type in a last name and it is selected.

    I do not want to use a regular drop down box as the list will be 200+ entries and don't want to use a textbox as the user could have the wrong name and be searching under the wrong name. I believe my solution would be the best way to solve the problem, but I can't find any actual code or instructions of the implementation

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Portsmouth UK
    Posts
    1,488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No replys to this one since yesterday so Ill give it a go

    1) generate an array using whatever method you want.

    2) sort the array according to the typed input and your criteria

    3) generate/modify a select box with as many entries that you want from the array

    see

    http://homepage.ntlworld.com/vwphill...tBoxSelect.htm

  3. #3
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  4. #4
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


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
  •