aspose file tools*
The moose likes PHP and the fly likes PHP Ajax Livesearch Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Languages » PHP
Bookmark "PHP Ajax Livesearch" Watch "PHP Ajax Livesearch" New topic
Author

PHP Ajax Livesearch

Mahtab Alam
Ranch Hand

Joined: Mar 28, 2012
Posts: 283

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.


Oracle Java Programmer , Oracle SQL Expert , Oracle Java Web Component Developer
timo corn
Ranch Hand

Joined: Oct 26, 2013
Posts: 68

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.


hth
Mahtab Alam
Ranch Hand

Joined: Mar 28, 2012
Posts: 283

Thank you timo for answering my questions .
Thanks again
Supun Lakshan Dissanayake
Ranch Hand

Joined: Oct 26, 2012
Posts: 133

What did you meant by LiveSearch

Dis you mean This
http://jqueryui.com/autocomplete/


Are you better than me? Then please show me my mistakes..
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: PHP Ajax Livesearch