I am creating an ASP.NET/C# application. I want a progress bar/loading appear when selecting a RadioButtonList
& DropDownList
. The RadioButtonList
& DropDownList
is AutoPostBack
.
I need to display a progress bar/loading for RadioButtonList
& DropDownList
.
Thank You.
function ShowProgress() {
setTimeout(function () {
var modal = $('<div />');
modal.addClass("modal");
$('body').append(modal);
var loading = $(".loading");
loading.show();
var top = Math.max($(window).height() / 2 - loading[0].offsetHeight / 2, 0);
var left = Math.max($(window).width() / 2 - loading[0].offsetWidth / 2, 0);
loading.css({ top: top, left: left });
}, 200);
}
$('form').live("submit", function () {
ShowProgress();
});