Forum Moderators: coopster
If there is a better way than javascript confirm box to do this, I am open to suggestions.
Thanks in advance!
$FormError = "Invalid E-mail address"; The javascript:
function checkForError() {
var error = '<?php echo $FormError;?>';
if (error > '') {
alert(error);
return false;
}
}
Then the form:
<form action="script.php" method="post" onsubmit="return checkForError();"> Just an example off the top of my head, it may need some tweaking to make sure it works like you want it to. Hope this helps!