By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
463,261 Members | 659 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 463,261 IT Pros & Developers. It's quick & easy.

AutoComplete a Field & AutoFill a Form (Php/Mysql)

P: 1
Hello, a first timer here! stumbled upon one of the threads hear while searching on google & the feedback was awesome so I decided to jump in & ask my Q! I'm a newbie in AJAX, but I know my way pretty well in PHP / MySQL.

What is the best/easiest practice that you have used to autocomplete a field & autofill a form?

Here is the senario.

I have a MySql table with contacts details, I want that when I start filling the name of the contact in the field, I do get suggestions (autocomplete) & when I choose a suggestion, blur out of the field or press tab the other fields of the form be filled (tel, address, email....) without loading the page.

Any suggestion / tutorial / directions are welcomed

thanks in advance!
Sep 28 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 16,027
You can use Ajax for both. When the user starts typing, you can use the onkeyup event to make the request for the autocomplete. For the auto-fill either use onchange or onblur. Here's an example of an autocomplete script.
Sep 28 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.