ho variato il code come segue:
<script language="JavaScript">
<!--
function submitIt(theform) {
if (theform.nome.value == "") {
alert("Manca il nome...");
theform.nome.focus();
return false;
}
if (theform.cognome.value == "") {
alert("Manca il cognome...");
theform.cognome.focus();
return false;
}
val_email=document.theform.email.value;
if (val_email.indexOf("@")==-1) {
alert("Manca l'email...");
theform.email.focus();
return false;
}
}
-->
</script>
ma se lascio il campo email bianco non apre più la finestra di alert ma il browser restituisce:
Microsoft JET Database Engine error '80004005'
Field 'tbl_login.email' cannot be a zero-length string.
/cliente.asp, line 66
dove cliente.asp è <form ACTION="cliente.asp" name="frm_cliente" method="post" onSubmit="return submitIt(this)">
line 66:
objConn.close
non capisco che c'entra però...
![]()