I am trying to set up a data validation routine. I have a FORM which consists ten rows, each with two columns called code and description,i.e.
<form>
CODE: <user input> DESC: <auto generated>
CODE: <user input> DESC: <auto generated>
etc, 10 times
</form>
The first column is for the user to enter a code.
I would like to complete the second (description) column by passing the code to mysql, check if it exists and if it does to show the description in the second column.
My problem is that I want to carry out this validation before the user presses the submit button. An Onchange event would probably trigger the validation. Within this Onchange event I would like to get the result of the query and insert the details in the second column, allowing the user to proceed to the next row.
The aim is that everytime a user completes the code column and exits the field, the code is validated and the description inserted.
Any ideas?
Thank you for any help.