Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PHP Ajax Livesearch

 
Mahtab Alam
Ranch Hand
Posts: 391
1
Java MySQL Database PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I`m looking to implement the google`s autosuggest with php and ajax.I searched a lot on the web , but can`t find the solution i`m looking for.
I want that data to be looked is from the database not from the xml file.
 
timo corn
Ranch Hand
Posts: 68
MyEclipse IDE PHP Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You must need a key-... event to get input values, Info here
api.jquery.com/keyup
api.jquery.com/keydown
.../keypress

Quote from another site:
keydown and keyup talk about which key has been changed. keypress tells which character that key represents

Then you need ajax, beforehand you get the input value (keys) from the form input field with $(this).val():
api.jquery.com/jquerypost

As an ocjp an easy task.
 
Mahtab Alam
Ranch Hand
Posts: 391
1
Java MySQL Database PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you timo for answering my questions .
Thanks again
 
Supun Lakshan Dissanayake
Ranch Hand
Posts: 135
Android Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What did you meant by LiveSearch

Dis you mean This
http://jqueryui.com/autocomplete/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic