"tireqty"
"oilqty"
-and-
"sparkqty"
and a button. The form action goes to a php page that I made, in which is validation, for whether or not the user inputted any data into each field.
Expand|Select|Wrap|Line Numbers
- <?php
- if( $tireqty == "")
- {
- echo "<script> alert ('You did not enter a number of tyres to order!'); history.go(-1); </script>";
- }
- else .....
^ This is ok but not fool proof.
Would it be possible to add Javascript to the first page (with the form) so that when you press the button, or on the 'onchange' function for each input/text box, it'd check the value of the text fields to make they are in number format and get the value is existant, similar to the PHP code above.
Would that be possible and what code would I need?
Hope that was clear enough, if not tell me and I'll try and rephrase.
Thanks,
Sam