Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何同时使用jqueryvalidator和jqueryui选项卡?_Jquery_Jquery Ui_Jquery Plugins_Joomla1.5 - Fatal编程技术网

如何同时使用jqueryvalidator和jqueryui选项卡?

如何同时使用jqueryvalidator和jqueryui选项卡?,jquery,jquery-ui,jquery-plugins,joomla1.5,Jquery,Jquery Ui,Jquery Plugins,Joomla1.5,我被Joomla中的jQuery插件困住了。我正在同时使用两个插件,现在我不知道如何使用它。我正在使用以下两个插件 jQuery验证插件 jQueryUI标签插件 我有三个与UI选项卡一起附加的表单。三个选项卡上的所有三个表单都已成功显示 现在,在第一个选项卡上,我使用jqueryvalidator的方式是,如果表单经过验证,那么表单将被提交(通过Ajax),第二个选项卡将自动打开,这样做很好 但是在第二个选项卡上,我还想验证该表单,如果第二个表单被验证,那么第三个选项卡将自动打开,否则它将

我被Joomla中的jQuery插件困住了。我正在同时使用两个插件,现在我不知道如何使用它。我正在使用以下两个插件

  • jQuery验证插件
  • jQueryUI标签插件
我有三个与UI选项卡一起附加的表单。三个选项卡上的所有三个表单都已成功显示

现在,在第一个选项卡上,我使用jqueryvalidator的方式是,如果表单经过验证,那么表单将被提交(通过Ajax),第二个选项卡将自动打开,这样做很好

但是在第二个选项卡上,我还想验证该表单,如果第二个表单被验证,那么第三个选项卡将自动打开,否则它将在第二个选项卡上停止,并提示用户填写所需的表单字段

现在我无法对第二个选项卡上的表单应用表单验证

我将所有JavaScript代码写入一个单独的文件,
property.js
。对于第一个表单,我是否需要为第二个选项卡添加另一个JavaScript文件,或者我们是否可以在该JavaScript文件上为第二个表单创建另一个
validator
实例

这是我的密码

/管理员/component/com_属性/views/addproperty/tmpl/default.php

.ui选项卡.ui选项卡隐藏{显示:无;}
*物业名称: *属性类型: -挑选- 公寓 商业的 小屋 开发用地 *地址行1: *价格:
尝试为每个表单提供一个唯一的id,并为每个表单添加验证程序。 例如:

jQuery("#addPropertyForm1").validate();
jQuery("#addPropertyForm2").validate();
jQuery("#addPropertyForm3").validate();

尝试为每个表单提供一个唯一的id,并为每个表单添加验证程序。 例如:

jQuery("#addPropertyForm1").validate();
jQuery("#addPropertyForm2").validate();
jQuery("#addPropertyForm3").validate();
<fieldset >
    <form name="propertyContactForm" id="propertyContactForm" action="" method="POST" >
        <table border="0" width="100%" cellpadding="5" cellspacing="5">
            <tr>
                <td><label for="contact_office"><sup>*</sup>Contact Office:</label></td>
                <td ><input type="text" name="contact_office" id="contact_office" size="47">
                </td>
            </tr>
            <tr>
                <td align="right" ><label for="contact_number"><sup>*</sup>Contact Number:</label></td>
                <td align="left" valign="top">
                    <input type="text" name="contact_number" id="contact_number">
                </td>
            </tr>
            <tr>
                <td ><label for="contact_person"><sup>*</sup>Contact Person:</label></td>
                <td align="left" valign="top">
                    <input type="text" name="contact_person" id="contact_person" size="47">
                </td>
            </tr>
            <tr>
                <td>&nbsp;</td>
                <td>
                    <input type="submit" value="<?php echo $this->title_text; ?>" name="submitContact" class="submit" id="submitContact" />
                    <input type="button" name="Back" onclick="javascript:history.go(-1)" value="Back" />
                </td>
            </tr>
        </table>
        <input type='hidden' value='com_property' name='option' />
        <input type='hidden' value='property' name='controller' />
        <input type='hidden' value='StorePropertyContacts' name='task' />
        <input type="hidden" name="<?php echo JUtility::getToken(); ?>" value="1" />
    </form>
</fieldset>
jQuery("#addPropertyForm1").validate();
jQuery("#addPropertyForm2").validate();
jQuery("#addPropertyForm3").validate();