The case scenario is like I have to check all available usernames/names from the databases whenever I type the letters instanly.

For example:- When type "je" in the userfield, it should show all combination of names starting with "je" inline. I am attaching a picture as sample.

Its indian railway website, where I type name of the train like "ka", it will show all names matching with it inline.
[IMG]http://farm3.static.flickr.com/2119/5803687637_48d9717b56_b.jpg[/IMG]

I need to implement this feature. any kind help would be appreciated , thanx a lot in advance

Recommended Answers

All 3 Replies

Member Avatar for stbuchok

Try the following:

On first key stroke get all names from the database that have the first character the same as the one typed and store into a javascript array.
On every key stroke after the first, filter the array rather than calling the database again.

If you are looking for code, just look up how to call a webservice using javascript. If you are using ASP.Net, look at using page methods.

I will do that, in the mean time, is there any script available to make feature like Google instant search. I think both are same feature right?

search in google for JQUERY-UI,
then see examples of AUTOCOMPLETE

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.