In this ASP.NET MVC 3 view, I need to control form submission completely via JavaScript (I use jQuery). Specifically, my form submission logic contacts the server via SignalR, which is a Comet framework (an improvement on Ajax, basically).
How can I install a JavaScript handler for any type of submission of forms in the view (e.g., via clicking the submit button or pressing Enter in a field)? The handler also needs to completely disable form submission while the server is processing.
Keep in mind that I’m doing unobtrusive client-side validation of forms in the view as well.
You could use the jQuery form plugin. Or do it manually by adding a global script to all pages: