Iscriviti alla newsletter | Visita cardiologica completa | Visita cardiologica con ECG Genova | Miglior cardiologo Genova | CoL Centro Oncologico Ligure
Iscriviti alla newsletter
function onSubmit(token) { // invocata da g-recaptcha
document.getElementById("FrmDatiUtente").submit();
}
function validate(event) {
event.preventDefault();
var form = document.FrmDatiUtente;
var cognome = form.cognome;
var email = form.email;
if (typeof email === 'string') {
email = email.trim();
}
var email_reg_exp = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
var password_reg_exp = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/;
var privacy = form.PresaVisione;
if ((email.value == "") || (email.value == "undefined")) {
alert("Il campo EMAIL è obbligatorio");
email.focus();
return false;
}
else if (!email_reg_exp.test(email.value) || (email.value == "") || (email.value == "undefined")) {
alert("Il campo EMAIL non sembra corretto o è incompleto: per favore verifica");
email.select();
return false;
}
//INVIA IL MODULO
else {
grecaptcha.execute();
}
}
// function abilitaInputAltro(){
// var form = document.FrmDatiUtente;
// var index = form.attivita.selectedIndex;
// var valore = form.attivita.options[index].value;
// if (valore != "0"){
// //document.getElementById('SettoreAttivitaAltro').style.display='none';
// document.getElementById('AttivitaCont').style.display='none';
// }
// if (valore == "0"){
// //document.getElementById('SettoreAttivitaAltro').style.display='block';
// document.getElementById('AttivitaCont').style.display='block';
// document.getElementById('AttivitaAltro').focus();
// }
//}
function onload() { //non rimuovere: indispensabile per recaptcha??
var element = document.getElementById('btnsubmit');
element.onclick = validate;
}
