im fairly new at javascript but i need to write a script for a project and don't know where to begin. basically it involves form validation... i guess here's the breakdown.
I have created a form in html already and need to figure out how to write this script.
1.
select any number of products (checkboxes) and set quantities for each. Must set at least one product and selected products must have a quantity value > 0.
2. The second portion involves shipping information (ie. Name, Address, City, State, Zip, phone number, and email).
The fields must all be filled in. The state must be a valid state code (two letters). The phone number must be all digits and 10 digits. The email must be formed at least like x@y.
3. i then need to have a subtotal of the items, based on how many were selected and such.
any help would be greatly appreciated,
thanks in advance.
I have created a form in html already and need to figure out how to write this script.
1.
select any number of products (checkboxes) and set quantities for each. Must set at least one product and selected products must have a quantity value > 0.
2. The second portion involves shipping information (ie. Name, Address, City, State, Zip, phone number, and email).
The fields must all be filled in. The state must be a valid state code (two letters). The phone number must be all digits and 10 digits. The email must be formed at least like x@y.
3. i then need to have a subtotal of the items, based on how many were selected and such.
any help would be greatly appreciated,
thanks in advance.
Comment