Hello everyone, I am having a problem with my sidebar. The scenario is this, I have form on the page and then i have a left sidebar with input element(search box) and a table element. The table serves as a container of all records from the database (specifically it will only show up the first name and last name). So what I really want is to put a something autofilter on the table, everytime I type a character/s on the input box, It will automatically filter the table. And the major thing here is when I click a certain record on the table, it will automatically populate on the form fields. Is it possible to happen? I will appreciate all your replies. Thanks.
I believe this is what you're looking for; http://jqueryui.com/autocomplete/ I can't put together some code because I don't know your database setup, obviously. Hope this helps though, the code is really straightforward!
Hi thanks for the reply, I think this one could really help me but how could I implement it on my form population? I mean how could I put php script in this js? Could I add up on this one?
Well, you could add your PHP here: var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang", "Fortran", "Groovy", "Haskell", "Java", "JavaScript", "Lisp", "Perl", "PHP", "Python", "Ruby", "Scala", "Scheme" ]; Code (markup): Select the data you want to search, run it through a loop and comma delimiter it
ok it is clear now, but I have one more question, let say I already put the script there and then how could I add onclick event on the data that will get the id and will trigger to the database and fetch the records from it based on the selected data and will populate the records to the form fields? I'm really sorry I'm a just new to programming, thank u very much..