Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function controlla() {
- var email=(document.getElementsByName("emailutente")[0].value);
- var password=(document.getElementsByName("passwordutente")[0].value);
- var confermapassword=(document.getElementsByName("confermapassword")[0].value;
- var username=(document.getElementsByName("usernameutente")[0].value);
- var nome=(document.getElementsByName("nomeutente")[0].value);
- var cognome=(document.getElementsByName("cognomeutente")[0].value);
- var datadinascita=(document.getElementsByName("datadinascitautente")[0].value);
- var sesso=(document.getElementsByName("sessoutente")[0].value);
- var telefono=parseInt(document.getElementsByName("telefonoutente")[0].value);
- var codicefiscale=(document.getElementsByName("codicefiscaleutente")[0].value);
- if ((email!=0) && (isNaN(email)==true) &&
- (password!=0) && (isNaN(password)==true) &&
- (confermapassword!=0) && (isNaN(confermapassword)==true) &&
- (username!=0) && (isNaN(username)==true) &&
- (nome!=0) && (isNaN(nome)==true) &&
- (cognome!=0) && (isNaN(cognome)==true) &&
- (datadinascita!=0) && (isNaN(datadinascita)==true) &&
- (sesso!=0) && (isNaN(sesso)==true) &&
- (telefono!=0) && (isNaN(telefono)==false) &&
- (codicefiscale!=0) && (isNaN(codicefiscale)==true) &&
- (password==confermapassword)) {
- document.getElementById("inserimento").submit();}
- else if (password!=confermapassword) {
- alert("Le pass non sono uguali");}
- return false;
- else { alert("Attenzione! Ci sono valori errati. Riprovare.");
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement