Blog
Uncategorized
Using val() in jquery to lookup data from a input box according to what’s is selected from
It adds the data to the html contact field below according to what is selected from the customer field. But when I save the data it saves what is in the contact field in the customer field also. How can I stop this from happening.
All the scripts below worked just fine until I added the first one below
This is the jquery script I am using
function updateValue(){ $(‘#contact’).val($(‘#customer’).val());}//update once the page has loaded too$(document).ready(function () { updateValue();});Here is the two html fields that are being used