Reputation: 6509
I'm getting the following error when I use this piece of script:
<script type="text/javascript">
$(function() {
$('form').validVal(); // line 37
});
</script>
Error:
"Object doesn't support this property or method" - Line 37, Char 4
Can anyone explain how I fix this?
Is this a common error with IE/IE8?
Thanks for any pointers
Upvotes: 0
Views: 334
Reputation: 57316
Before you can use validVal
method, you need to make sure to include the validVal
plugin:
<script src="jquery.validVal.js" type="text/javascript"></script>
Second, check the selector - the way it is now it will apply this to every form
element on the page. You probably want to add something like id="myForm"
to your form element
and then use
$('#myForm').validVal();
Upvotes: 2