Page 1 of 1

How to implement search help?

Posted: Sat Jan 27, 2007 4:41 am
by itsmani1
There is an option in Firefox "Remember what I enter in forms and search box".
What it does it saved the data that you enter in form and if you try write that data again it shows you this data down.

Now i want to implement some thing like this:
If you user types ch form the states list it should pick stales which starts with word "ch" like Chicago and show it in a drop down list or box.
This can be done by sending ajax request to a php page but i don't know how can i show it in search box?

any help
thank you

Posted: Sat Jan 27, 2007 4:46 am
by louie35
That's exactly what I am working on at the moment.
What I did was to store the search queries the user made and results returned. if result were > 0 the store it else dump it.

After a while the table got enough results to start using the auto-suggest ajax.

you can check it out here: http://www.funkymotors.ie and try looking for - cd player

Posted: Sat Jan 27, 2007 9:27 am
by feyd
It is often done with Ajax. For examples search for Google Suggest (or Suggestions)

Posted: Sat Jan 27, 2007 11:01 am
by RobertGonzalez
Look for 'autocomplete'... there is a wealth of information about it on the web. Or download Scriptaculous which has a built in implementation of autocomplete.