0

Form wouldn't submit and keep popping out. "Not all fields are valid".

<script type="text/javascript">

	   dojo.require("dojo.parser");
       dojo.require("dijit.form.ValidationTextBox");
	   dojo.require ("dijit.form.Form");
	   dojo.require("dijit.form.CheckBox");
	   dojo.require ("dijit.form.FilteringSelect");
	   dojo.require ("dijit.form.TextBox");
	   
	   
	   var valid = true;
function checkPw(formFields) {

//alert (formFields.uPass);
//alert (formFields.uPass2);

if (formFields.uPass !== formFields.uPass2) {
alert("Confirmation password is different.");
valid = false;
}
return valid;			
}

function submitIfValid(valid) {
if (valid) {
document.signup.submit();
return true;
} 
else {
alert('Not all fields are valid');
return false;		
}	
}

function both(formFields, valid) 
{
      submitIfValid(checkPw(formFields));
}

</script>

Help appreciated. Thanks.

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by rockbluster
0

Post web related questions in JSP forum.
Error: use != instead of !==

..
formFields.uPass != formFields.uPass2
..
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.