EvilZone
Programming and Scripting => Web Oriented Coding => : poscore August 01, 2012, 01:15:15 PM
-
Hello, i am delevoping a PHP project using HTML, PHP, MySQL, CSS. I have a field like a dropdown menu where the options are taken from a database. They just told me that there could be 500 options too. So i can not leave it like this! :D It would be perfect to have a input field where the user start writing some text and it instant filter the results. Something like google instant search. I hope this is clear! :)
The problem is that i have no idea of jquery or javascript :/ Could someone help me out? Maybe give me a link or code or some other help? :/
Thank you guys :)
-
Take a look at this site: http://woorkup.com/2010/09/13/how-to-create-your-own-instant-search/ (http://woorkup.com/2010/09/13/how-to-create-your-own-instant-search/)
-
I hope this works. I' ll try this tommorw and update the post.
-
Well, itried something at my local server and basically i think this does not work for me. You have to Submit the form so as to get some output data right? I would like as the user writes in the form automatically it searches the database. :/ I hope my question is clear :/
-
If that doesn't work i do only see these two options. I think this is the closest you will get. There might be a solution, but i do not know about it.
http://www.w3schools.com/php/php_ajax_livesearch.asp (http://www.w3schools.com/php/php_ajax_livesearch.asp)
http://jqueryui.com/demos/autocomplete/ (http://jqueryui.com/demos/autocomplete/)
But i do not think you will be able to get it 100% like Google did with their instant search function.
-
Ok, ill definitely gonna program this function according to the new links and the old one. One more source is in phpacademy.org about jQuery Tutorial.thank you for your help
-
No problem, I'm glad i could help.