There is a text box in html page in that we type any id (i.e string) then automatically it show a drop down list bellow the text box. And that list having ids those r retrieving from Mysql database table.
(Totally it is like igoogle search box and button)
please any body help me in this matter

8 Years
Discussion Span
Last Post by laxminarayanaou

What server side language are you working with (PHP/ASP/other)?
What type of database are you working with ( MySQL/MSSQL/SQLite)?

Now i personally prefer to work with jQuery so i'm going to link you to the very first result i get when i run the search i provided: http://nodstrum.com/2007/09/19/autocompleter/, i'm not a big fan of the styling but look at the code that is provided.

The general concept of this functionality, is an input box with a keyup event and a hidden div with its position set relative to the input box.

When the user types in the text box, it actually makes a request via ajax to a server-side page, where it takes the value and does a query against your database. In the examples case it formats the results and returns the result back to the ajax handler. From there, the ajax handler, takes the results and puts them into the hidden div and makes it display.

It's pretty simple once you wrap your head around the concept.


Thank you for replying.
I am using php as server side scripting, and Mysql is the databse.
I got a dropdown list bellow the text box.if click on the search button searching is done.but i want that if i click on the item in the list it wil also get the data from that database. i want that.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.