I have a mturk survey and would like to validate the results when clicking the submit button. I found out there is one way discussed here. However, that does not seem to work. Does anyone have any idea?
My code (JS part):
<script type="text/javascript">
window.onload = function() {document.getElementById('submitButton').setAttribute('onclick', 'return validateForm()'); }
function validateForm() {
alert("test");
return false;
}
There is no alert and the submission succeeded.