Hello all.
I'd like to create a real-time, intuitive/predictive search field on a web form. I have a list of names I query into an array from a MySQL database which number more than 1200. Creating a standard popup would be tedious to scroll through. I could also have the user enter in a partial name and click on a "search" button, but I would really like something a little faster and less obtrusive.
What I'd like to accomplish is to have a text field that, as the user types part of the name, would present a list of matches from the 1200 entries...either in a textarea next to the entry field or as a popup menu.
I haven't found much on using php variables from within javascript, so I'm not entirely sure that it can even be done, so that's the first question I'd like to ask. I really need to get to the array of names I've loaded in from a MySQL query.
Any ideas would be greatly appreciated.
Thanks!
I'd like to create a real-time, intuitive/predictive search field on a web form. I have a list of names I query into an array from a MySQL database which number more than 1200. Creating a standard popup would be tedious to scroll through. I could also have the user enter in a partial name and click on a "search" button, but I would really like something a little faster and less obtrusive.
What I'd like to accomplish is to have a text field that, as the user types part of the name, would present a list of matches from the 1200 entries...either in a textarea next to the entry field or as a popup menu.
I haven't found much on using php variables from within javascript, so I'm not entirely sure that it can even be done, so that's the first question I'd like to ask. I really need to get to the array of names I've loaded in from a MySQL query.
Any ideas would be greatly appreciated.
Thanks!