Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
115 Points
243 Posts
Apr 27, 2012 02:08 PM|LINK
I got it to work but not using the actual id of the Html.BeginForm, I used this and this works:
$(function () { $("form").submit(function (e) { alert("onSubmit"); onSubmit(); }); });
But this event fires even when the form does not validate. I either need to find a way for this event not to fire if the form does not validate or be able to check inside the event if the form validated. How do I do this?
NickKA
Member
115 Points
243 Posts
Re: Html.ValidationSummary Question
Apr 27, 2012 02:08 PM|LINK
I got it to work but not using the actual id of the Html.BeginForm, I used this and this works:
$(function () { $("form").submit(function (e) { alert("onSubmit"); onSubmit(); }); });But this event fires even when the form does not validate. I either need to find a way for this event not to fire if the form does not validate or be able to check inside the event if the form validated. How do I do this?