help to program for search in database, How to search in database while typing |
help to program for search in database, How to search in database while typing |
zhenglg |
Jun 3 2010, 03:25 PM
Post
#1
|
Group: Members Posts: 1 Joined: 3-June 10 Member No.: 12,013 |
New in programming.
MySQL database hph We have a list of city names in a database; like to let users to type in the city name and search in the database, disply the match(es) instantly, so users can pick, without need to type full name. For example, like in airlines' website search for airticket. As soon as a visitor start typing a city name, the program start search and disply matches, then the user just pick from the list, no need to type the rest. How to program for that feature? Can anyone hlep, with a sample coding? Appreciated. |
Brian Chandler |
Jun 3 2010, 10:13 PM
Post
#2
|
Jocular coder Group: Members Posts: 2,460 Joined: 31-August 06 Member No.: 43 |
You would need to do this on the client side, with javascript. Either by sending the whole list of cities in the page, or with "Ajax" dynamic requests.
|
Frederiek |
Jun 4 2010, 01:20 AM
Post
#3
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
Search for "autosuggest".
|
Lo-Fi Version | Time is now: 29th March 2024 - 01:59 AM |