Created
January 8, 2014 10:02
-
-
Save christian-fei/8314439 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
domanda | |
+risposte*5 | |
*/ | |
var domande = document.querySelectorAll('.domanda'); | |
function submitAllowed(){ | |
var ret=true; | |
for( domanda in domande){ | |
if(ret===false){ | |
return false; | |
} | |
var a = domande[domanda]; | |
var input = a.querySelectorAll('input'); | |
for( inputSingolo in input){ | |
var b = input[inputSingolo]; | |
if( b.checked ){ | |
ret=true; | |
break; | |
}else{ | |
ret=false; | |
} | |
} | |
} | |
return ret; | |
} | |
/* | |
var submitE = document.querySelector('input[type="submit"]'); | |
submitE.addEventListener('submit', submitAllowed, true); | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment