Dynamic dropdown selection fills in textfields from db with ajax
I have 2 files. html.php and getuser.php
In html.php I have a dynamic dropdown filled with ids from a mysql
database. In getuser.php I have code that should take the selected
dropdown value and return the companyname where the id is the same as the
id value from the dropdown.
You can see the files in jsfiddle (In the js area!):
html.php
(http://jsfiddle.net/qHvZM/1/)
getuser.php
(http://jsfiddle.net/Ez9Hs/)
WHAT DO I WANT TO ACHIEVE: The db has the following details:
cb_dealerid = 001, 002, 003, 004
cb_bedrijfsnaam = Joop BV, Kelly Ltd, Johan Ltd, Peter BV
When you select from the dropdown value 002 then it should say in the
appropriate area Kelly Ltd.
Thanks for any help!
No comments:
Post a Comment