The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> help to program for search in database, How to search in database while typing
zhenglg
post 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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post 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.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post 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".
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 29th March 2024 - 01:59 AM