开发者

jQuery Validation and Form Plugin

开发者 https://www.devze.com 2023-02-12 22:08 出处:网络
I have no luck running this both plugin in the same page the Form: http://jquery.malsup.com/form/andValidation: http://bassistance.de/jquery-plugins/jquery-plugin-validation/

I have no luck running this both plugin in the same page the Form: http://jquery.malsup.com/form/ and Validation: http://bassistance.de/jquery-plugins/jquery-plugin-validation/

every time I check the error console in firefox it says "jQuery is not defined"

sorry i forgot to add the header.

<head>
<script type="text/javascript" src="../jQuery/jquery.js"></script>
<script type="text/javascript" src="../jqueryValidation/jquery.validate.js"></script>
<script type="text/javascript" src="../jquery.form.js"></script>
</head>

<form id="form" name="form" method="post" action="Data.asp">
<input type="text" name="ISNo" id="ISNo" class="required"/>
<input type="text" name="ISDate" id="ISDate" class="required"/>
<input type="submit" value="save!">
</form>

<form name="Search" id="Search" method="post" action="Search.asp">
<input type="text" na开发者_如何学Gome="txtname" id="txtname"/>
<input type="text" name="txtaddress" id="txtaddress"/>
<input type="submit" value="Search">
</form>


You must be trying to load the jQuery plugin scripts before you've loaded jQuery itself - or you're not loading jQuery at all. Solution: your <head> should look something like this:

<head>
    <script src="/js/jquery.js"></script>
    <script src="/js/jquery.form.js"></script>
    <script src="/js/jquery.validation.js"></script>
</head>

N.B. you may also have issues using those plugins with the latest version of jQuery (currently 1.5) since they do not appear to have been tested with versions beyond 1.3.2 (Forms) and 1.4.2 (Validation).


Make sure jQuery .js is included before any of the plugins .js in <head> section.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号