copy the following script into the head of your template:
function validEmail(TheForm, TheField, TheValue) {
invalidChars = " /:,;<>?"
if (TheValue == ""

{
document.newMemberForm.submitNew.value="Submit Info"
return false
}
for (i=0; i<invalidChars.length; i++) {
badChar = invalidChars.charAt(i)
if (TheValue.indexOf(badChar,0) > -1) {
document.newMemberForm.submitNew.value="Submit Info"
return false
}
}
atPos = TheValue.indexOf("@",1)
if (atPos == -1) {
document.newMemberForm.submitNew.value="Submit Info"
return false
}
if (TheValue.indexOf("@",atPos+1) > -1) {
document.newMemberForm.submitNew.value="Submit Info"
return false
}
periodPos = TheValue.indexOf(".",atPos)
if (periodPos == -1) {
document.newMemberForm.submitNew.value="Submit Info"
return false
}
if (periodPos == atPos+1) {
document.newMemberForm.submitNew.value="Submit Info"
return false
}
if (periodPos+3 > TheValue.length) {
document.newMemberForm.submitNew.value="Submit Info"
return false
}
return true
}
in the form use this text field as email field:
<cfinput type="text" name="email" size="30" maxlength="30" onvalidate="validEmail" value="" onfocus="this.select()">
replace the submit button with this one:
<input type="submit" name="submitNew" value="Submit Info" onclick="this.value='Please wait...'" style="font-family : Arial, Helvetica, sans-serif; font-weight : bold; font-size : 12px; width: 508px; height: 20px"> Sylvano
dsylvano@hotmail.com