Posted on 2010-11-17
I have a simple HTML form.
<label>Customer ID</label><input type="text" name="id_num" id="id_num" />
<label>Customer Name</label><input type="text" name="customer_name" id="customer_name" /><label>Customer Location</label><input type="text" name="customer_location" id="customer_location" />
<input name="submit" type="submit" value="submit" />
I also have a PHP script that echos JSON in the following array.
So what I would like to do is populate my formfields based off the first input (id_num)
When someone puts the number in the first field and then goes to the next field it sends the number to my PHP script and then returns the JSON array and fills in the rest of the fields from the array. After which they can submit the form.
Would really appreciate help getting started in writing the JS for this.