I have a form where the customer would like a JavaScript array created so when the user selects a name from a dropdown box the associated fields on the form are populated from the array. The only call to the SQL database would be when the form first loads to create the JavaScript array.
Here is the form:
Name: This is the dropdown box
Age: Textbox
Grade: Textbox
I am assuming I use onchange to call a function to get the values but I am unclear on how to create the array or populate the textboxs on the form.
I am somewhat new to JavaScript so code examples would be greatly appreaciated.
Thank you.
David
Note your array should be accessible from jS
see this example
http://stackoverflow.com/questions/13271027/javascript-filling-dropdown-from-array-based-on-another-value-of-another-dropdow