Is it possible to show an overlay when a form is submitted (not via Ajax)?
A bit of background: I am using asp .net MVC and I am not allowed to asynchrounously submit the form using JQuery. When the user submits the form it takes a few seconds for the save to happen and then a message is displayed to them. In this time the client wants to show an ove开发者_开发问答rlay with an image and a processing label. I was using BlockUI (Jquery plugin) for all overlays but it wont work since I am not posting the form via ajax.
Any ideas on how to show an overlay is much appreciated.
TIA.
Regards,
Raja
You can tie a overlay to the button click, because you are not using AJAX the form submission will reload the page.
Also, blockUI should not require AJAX.
$('.button').click(function() {
$.blockUI();
});
Since u are using MVC, am not sure if u are using webforms or controllers.
Please try this,
For webforms, u can use OnClientClick to call a javascript to show the div that has the processing gif image.
For controller pattern, in onclick event handler before the form is submitted, use javascript/jquery to show the div that has the processing gif image.
精彩评论