[jQuery] Newbie: validation plug-in radiobutton
Hi,
I am having a hard time, finding a way to make form work with the validation plug-in.
I am missing obviously something very essential and would really appreciate if you could point out the missing pieces.
Below is a simple form with one question and radio buttons.
The form submits no matter what.
<html>
<head>
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery.validate.js" type="text/javascript"></script>
<script language="javascript">
$(document).ready(
function(){
$("#MyForm").validate();
});
</script>
<style>
label.error {
display: none;
color: red;
font-style: italic
}
</style>
</head>
<body>
<form action="
testeasyform.cfm" id="MyForm" name="MyForm" method="post">
<label for="SchoolHasCounselor"><strong >1. Does your school have a Career Counselor/</strong></label>
<br/>
<input type="radio" name="SchoolHasCounselor" value="1" validate="required:true">Yes
<input type="radio" name="SchoolHasCounselor" value="0">No
<input type="radio" name="SchoolHasCounselor" value="n/a">Don't know
<label for="SchoolHasCounselor" class="error">Please check one!</label>
<br/>
<input type="Submit" value="Go" id="submit" name="submit">
</form>
</body>
</html>