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

Recommended Answers

All 4 Replies

That would be an AJAX auto complete/auto suggest feature. Have you even tried looking for examples?

i have tried from examples.but it is not solved.please help me.

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:, 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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.