T
thj
Hi.
I've got this form that I'm trying to validate:
<form id="periodForm" action="" method="post">
<p>
Periode:
<input id="startDate" name="startDate" type="text" size="7"
value="<%= ViewData["StartDate"] %>" />
-
<input id="endDate" name="endDate" type="text" size="7"
value="<%= ViewData["EndDate"] %>" />
<input id="submit" type="submit" value="Search" />
</p>
</form>
With the following jquery-validate code:
<script type="text/javascript">
$(document).ready(function()
{
$("#periodForm").validate(
{
rules:
{
startDate: "required",
endDate: "required"
},
messages:
{
startDate: "Skal angives",
endDate: "Skal angives"
}
});
});
</script>
When I'm pushing the submit button, the page reloads, and I get the
error "Object expected", on the line:
$(document).ready(function()
I've double checked everything, and can't find any errors - could you
please help me out here?
Thanks in advance.
Tommy.
I've got this form that I'm trying to validate:
<form id="periodForm" action="" method="post">
<p>
Periode:
<input id="startDate" name="startDate" type="text" size="7"
value="<%= ViewData["StartDate"] %>" />
-
<input id="endDate" name="endDate" type="text" size="7"
value="<%= ViewData["EndDate"] %>" />
<input id="submit" type="submit" value="Search" />
</p>
</form>
With the following jquery-validate code:
<script type="text/javascript">
$(document).ready(function()
{
$("#periodForm").validate(
{
rules:
{
startDate: "required",
endDate: "required"
},
messages:
{
startDate: "Skal angives",
endDate: "Skal angives"
}
});
});
</script>
When I'm pushing the submit button, the page reloads, and I get the
error "Object expected", on the line:
$(document).ready(function()
I've double checked everything, and can't find any errors - could you
please help me out here?
Thanks in advance.
Tommy.