Posted on 2004-04-06
I've a form named AddEmp and the action="EmpAdd.jsp" which include the following fields:
EmpNo (a 4 digit number)
EmpPIN (a 4 digit number)
EmpName, EmpIC, EmpAdd, EmpContact (all strings)
Department (a dropdown list)
A submit and reset image button
I wish to get help in typing the coding to check if the EmpNo & EmpPIN is a 4 digit number, to check if the strings are all filled in and does the user select a department.
I don't mind using alert to display the message and if all the fields met the requirement, will the form proceed to EmpAdd.jsp?