HTML Form Form Action Metoda JavaScript
A form action set to a JavaScript function is not widely supported, I'm surprised it works in FireFox.
The best is to just set form action to your PHP script; if you need to do anything before submission you can just add to onsubmit
Edit turned out you didn't need any extra function, just a small change here:
function validateFormOnSubmit(theForm) {
var reason = "";
reason += validateName(theForm.name);
reason += validatePhone(theForm.phone);
reason += validateEmail(theForm.emaile);
if (reason != "") {
alert("Some fields need correction:\n" + reason);
} else {
simpleCart.checkout();
}
return false;
}
Eager Elephant