function validazione(){ formTable='richieste'; var msgErr="MSG_PLEASE_FILL:\n" var msgErr2=""; curform=document.forms["modulo"]; // verifico che il ceck della privacy sia cliccato if(document.modulo.elements["privacy"].checked==true){ // Company isVuoto(formTable+'.Company') if(fill=='')msgErr2+='CL_COMPANY\n' //Nome isVuoto(formTable+'.Firstname') if(fill=='')msgErr2+='CL_NOME\n' // Cognome isVuoto(formTable+'.Surname') if(fill=='')msgErr2+='CL_COGNOME\n' // Telefono //isVuoto(formTable+'.Phone') //if(fill=='')msgErr2+='Telefono\n' //Email checkEmail(formTable+'.Email') if(fill=='')msgErr2+='CL_EMAIL\n' } else {msgErr2="MSG_PLEASE_PRIVACY\n"} if(msgErr2!=""){alert(msgErr+msgErr2)} // se vuoto faccio il subnmit if (msgErr2==""){ document.modulo.submit(); return true } else {return false} }