Cheers Jason, thanks for all the info (At some point you may need to start billing me for it all).
I was looking into the onsubmit part of the form tag (I had some vague memory of s script I picked up somewhere, having forgotten about Spry altogether) and eventually
found it - also containing javascript - but that script worked by disabling the submit button until the 'I accept the terms and conditions' checkbox had been ticked.
I thought it might help Groshko a bit, but suppose that's probably only effective in conjunction with serverside validation too. I attach the instructions anyway.
---------------------------------------------------------------------------------------
Hiya Groshko,
I may be wrong, but I believe that having a few of the server error elements with the same name (nameServerError) might cause you problems with the serverside
validations and the error messages on the page . I believe that each $WAFV_Errors (as listed in the block of WA Server Validations near the beginning of your page)
should refer to a uniquely named server error elements. (I think the 'nameServerError' originally just applied to the 'Name' field).
So for instance, in line 15 in the contact_php file:
$WAFV_Errors .= WAValidateRQ(((isset($_POST["Address"]))?$_POST["Address"]:"") . "",true,2);
refers to an input 2, which is the Address input field so perhaps in that block you could change the references to 'nameServerArea' to 'AddressServerError', i.e:
<span id="sprytextarea1">
<textarea name="Address" class="inputText" id="Address" onblur="if (document.getElementById('AddressServerError'))
document.getElementById('AddressServerError').style.display='none'" ><?php echo(ValidatedField("contact","Address")) ?
></textarea>
<span class="textareaRequiredMsg">A value is required.</span></span>
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "3" . ",") !== false || "3" == "")) {
if (!(false)) {
?>
<span id="AddressServerError" class="textfieldServerError">Please enter your address here.<br />
</span>
<?php //WAFV_Conditional contact.php contact(2:)
}
}
}?>
---------------------------------------------------------------------------------------
Attachment is the bit of 'diable button' code from Dynamic Drive.