Page 1 of 1
pull data from a site and place it in a form
Posted: Sun Apr 22, 2012 2:27 pm
by inosent1
my users comes to a field that asks for a value.
from the form they enter an address.
what i want to to grab that address from the form, get the value from another site, and add the value to the field.
Re: pull data from a site and place it in a form
Posted: Sun Apr 22, 2012 3:33 pm
by Robert07
If you want to display the data from another site in your form before the user submits the form you can use ajax, is that what you're trying to do? Please be more specific.
Re: pull data from a site and place it in a form
Posted: Mon Apr 23, 2012 1:00 pm
by x_mutatis_mutandis_x
inosent1 wrote:my users comes to a field that asks for a value.
sorry but that sounded dirty lol
Re: pull data from a site and place it in a form
Posted: Mon Apr 23, 2012 1:25 pm
by califdon
inosent1 wrote: get the value from another site
What does that mean? Do you mean use an API to look up a postal code, for example? How will the value be obtained?
If that is what you want to do, yes, use AJAX to call your PHP script that employs the API to look up the value, then returns that value to the Javascript function in your form page and inserts it where needed.