Thanks for your reply.

Does it matter where things are placed on the server relative to each other if 
the paths are correct?

My js file is working fine with jQuery.  Here's the include code, and I've 
verified that the paths are correct, neither of the plug-ins are working.

<script type="text/javascript" src="/misc/js/lib/jquery.js"></script>
<script type="text/javascript" 
src="/misc/js/customForm/cust_select_plugin.js"></script>
<script type="text/javascript" 
src="/misc/js/validate/jquery.validate.js"></script>




________________________________
From: Jörn Zaefferer <joern.zaeffe...@googlemail.com>
To: jquery-en@googlegroups.com
Sent: Sunday, May 24, 2009 9:26:24 AM
Subject: [jQuery] Re: validate plugin error: $("#short-form").validate is not  
a function

You most likely screwed up the javscript include of
jquery.validate.js. Make sure the path is right.

Jörn

On Sat, May 23, 2009 at 5:51 PM, stevegmag <steveg...@yahoo.com> wrote:
>
> jQuery JavaScript Library v1.3.2
> jQuery validation plug-in 1.5.2
>
> I think I'm using this plug-in straight from the examples for a simple
> form.  No matter what I have as the last option I get a similar error,
> in the case:
>
> $("#short-form").validate is not a function
> privacy_policy: "Please accept our privacy policy"
>
> This also throws an error:
> jQuery.validator is undefined in additional-methods.js
> jQuery.validator.addMethod("maxWords", function(value, element,
> params) {
>
> Sorta pulling my hair out at this point as I can't figure out what's
> causing either.
>
> Form HTML: (if more HTML would help let me know)
> <form id="short-form" name="short-form" action="<!-- cut action -->"
> method="post">
>        <label for="name" class="first">Name</label>
>        <input type="text" class="text" name="name" id="name" value="Your
> Full Name" />
>        <label for="email">Email Address</label>
>        <input type="text" class="text" name="email" id="email"
> value="y...@youremail.com" />
>        <fieldset>
>                <input type="checkbox" class="checkbox" name="news_updates"
> id="news_updates" value="yes" /><label for="news_updates" class="float-
> right">Yes, email me news and updates</label>
>
>                <input type="checkbox" class="checkbox" name="privacy_policy"
> id="privacy_policy" value="yes" /><label for="privacy_policy"
> class="float-right">I have read and understand the <a href="#">privacy
> policy</a></label>
>        </fieldset>
>        <label for="birth_year">Year of Birth</label>
>        <select id="birth_year" name="birth_year">
> <option label="" value="null">Birth Year</option>
> <!-- cut remaining options-->
>        </select>
>        <button type="submit" id="sign-up" value="sign-up">Sign Up</button>
> <!-- cut hidden fields -->
> </form>
>
> Javascript:
> $(document).ready(function() {
>        $("#short-form").validate({
>                rules: {
>                        name: {
>                                required: true,
>                                minlength: 2
>                        },
>                        email: {
>                                required: true,
>                                email: true
>                        },
>                        birth_year: {
>                                required: true
>                        },
>                        privacy_policy: {
>                                required: true
>                        }
>                },
>                messages: {
>                        name: {
>                                required: "Please enter a username",
>                                minlength: "Your username must consist of at 
> least 2 characters"
>                        },
>                        email:  "Please enter a valid email address",
>                        birth_year:  "You must select a Birth Year",
>                        privacy_policy: "Please accept our privacy policy"
>                }
>        });
> });
>



      

Reply via email to