kvnirvana Posted November 14, 2010 Share Posted November 14, 2010 This script makes an error in my page anybody knows why? <script> $(document).ready(function(){ $("#logForm").validate(); }); </script> Quote Link to comment https://forums.phpfreaks.com/topic/218630-script-error/ Share on other sites More sharing options...
kvnirvana Posted November 16, 2010 Author Share Posted November 16, 2010 Anyone? Quote Link to comment https://forums.phpfreaks.com/topic/218630-script-error/#findComment-1135026 Share on other sites More sharing options...
Adam Posted November 16, 2010 Share Posted November 16, 2010 I take it you're using this jQuery.validate plug-in? Firstly do you have the plug-in code included within a script tag? I've never used it myself so can only guess the problems, but it looks like you need to call it for individual inputs, not for a form as your selector suggests. Also it looks like you have to specify a 'valid()' function within the parameters in order to actually validate the input; which makes sense as how's it supposed to know what's valid otherwise? Quote Link to comment https://forums.phpfreaks.com/topic/218630-script-error/#findComment-1135062 Share on other sites More sharing options...
kvnirvana Posted November 16, 2010 Author Share Posted November 16, 2010 Ok, the problem was simply bacause the path to jquery was incorrect. Stupid mistake. Thank you for helping out :=) Quote Link to comment https://forums.phpfreaks.com/topic/218630-script-error/#findComment-1135113 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.