Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在weebox中调用jquery验证不起作用问题 #12

Open
GoogleCodeExporter opened this issue Mar 24, 2015 · 2 comments
Open

在weebox中调用jquery验证不起作用问题 #12

GoogleCodeExporter opened this issue Mar 24, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

前提:在我的网页中添加了以下引用
jquery.js
jquery.validate.js
写了以下脚本
弹出窗口脚本:
  $.weeboxs.open('#EditProject', {
                                title:"新增项目", 
                                modal:true,//默认为true 
                                draggable:true,//默认为true
                                //position:{refele:this},
                                animate:true,
                                timeout:0,//默认为0
                                width:430, 
                                height:280

                            }); 
**********************************************************
验证脚本
 <script language="javascript" type="text/javascript">
$().ready( function() {
    $("#form1").validate({
        rules: {
                txtPrjCode: {required: true,email: true},
                txtPrjName: {required: true,    minlength: 
2},
                txtBeginDate:{required:true,date:true},
                txtEndDate:{required:true,date:true}
               },
        messages: {
                txtPrjCode:{required: "项目编号不能为
空!",email:"Email 格式不正确"},
                txtPrjName: "项目名称不能为空!",
                txtBeginDate:"开始日期不能为空!",
                txtEndDate:"结束日期不能为空!"
              }    
     });

});
</script>
************************************************
现象:
1:当DIV没有被弹出前,验证方法起作用.
2:当DIV使用$.weeboxs.open()方法弹出后,验证方法将不在起作用.

期望:
希望作者分析一下原因,给些建议或解决方案.

Original issue reported on code.google.com by [email protected] on 16 Dec 2009 at 7:53

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

将角本写在
  $.weebox.open() 后面就行了。。

Original comment by [email protected] on 9 May 2010 at 3:29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant