表格过帐和验证 [英] Form Posting and Validation

查看:68
本文介绍了表格过帐和验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个登录表单,它有两个按钮用于登录,另一个用于打开模态弹出窗口(用于注册)。

对于登录按钮我创建了一个单独的验证组,并在模态弹出窗口我正在使用jquery Dialog打开一个存在于同一登录页面上的div。

然后我为注册按钮调用_doPostback。我有单独的注册页验证组。



问题出现在验证中,当我点击注册按钮时,它提交表单并在登录控件上显示验证。我尝试使用JS进行验证,但即使在验证消息之后,它也会发布表单。



I have a login form, it has two buttons one for login and another for opening modal popup(for signup).
For Login button I have created a separate validation group, and on modal popup I am opening a div which exists on same login page using jquery Dialog.
Then I am calling _doPostback for signup button.I have separate validation group for signup page.

The problem is arising with validation, When I click on signup button, its submitting the form and showing validation on login controls. I tried with validating using JS,but even after validation message,its posting the form.

function GenerateClick() {

           __doPostBack('<%#btnSignUp.ClientID  %>');

       }







<asp:Button ID="btnSignUp" runat="server" Text="SignUp">





我试过这个





I have tried this

>function GenerateClick() {
if(document.getElementById("txtEmail").value == "")
{
alert("Enter Email");
return;
}
else{
           __doPostBack(&#39;&lt;%#btnSignUp.ClientID  %&gt;&#39;);
}
       }<





秒当我在注册表单上输入所有fied并单击注册时,它关闭模态弹出窗口并在登录表单控件上显示验证

问题仅出现在IE 9中



Second, when I enter all fieds on signup form and click signup, It closes the modal popup and shows validation on login form controls
The issue is arising only in IE 9

推荐答案

再次尝试清除IE9的chache记忆
try again clear the chache memorry of IE9


这篇关于表格过帐和验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆