jQuery & ASP.NET validators conflict problem

I have a page which has a form with a few validators. I also have a button (HTML submit) which resets form and clears all textboxes. The code works fine the first time I click the button, which clears the form. But if I refill the form and try to clear the form for the second time, it won't work. I also have other jQueries to toggle areas of code, they also stop working after this. One thing to mention is that when I press clear form button, asp validators show themselves, which is odd to me because I have not put a validationGroup on them and not on my button. I think this happens because the button tries to do a postback. So two questions, first what's causing my queries not to work? And second, how do I stop the button from attempting to post back (which causes validators to be shown)? The code looks something like this:
label & texbox pairs to get info from user, accompanied by Required field validators. -->The button to clear form on client side.
In case there may be other causes to your problem, please post actual code.

以上就是jQuery & ASP.NET validators conflict problem的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准