Hi there,
I am using the following function to check for a required field:
The code is checking for the required field, and displays the alert box however when the user clicks ok, the form is still processed!Code:function verify() { var themessage = "You are required to complete the following fields: "; if (document.order.tandc.value=="") { themessage = themessage + " - Terms & Conditions"; } //alert if fields are empty and cancel form submit if (themessage == "You are required to complete the following fields: ") { document.order.action=insertstandard.php; } else { alert(themessage); return false; } }
Any help with this much appreciated.
Kind regards, Mike


Reply With Quote

Bookmarks