Hi team,
How to show progress modal in page after button click
I am using below code in my page to disable button after click until it execution completes. So the user can get idea that data is processing.
Along with this in my script i want to show Progress image on center of page till execution completes.
It will be much better if you modify the below script which works fine in my application.
<script type="text/javascript">
function disableBtn(btnID, newText) {
Page_IsValid = null;
if (typeof (Page_ClientValidate) == 'function') {
Page_ClientValidate();
}
var btn = document.getElementById(btnID);
var isValidationOk = Page_IsValid;
if (isValidationOk !== null) {
if (isValidationOk) {
btn.disabled = true;
btn.value = newText;
}
else {
btn.disabled = false;
btnFilter.disabled = false;
}
}
else {
setTimeout("setImage('" + btnID + "')", 10);
btn.disabled = true;
btn.value = newText;
}
}
</script>
<asp:Button ID="btnSubmit" Text="Submit" runat="server" CssClass="btn btn-primary"
OnClick="btnSubmit_Click" ValidationGroup="validGroup1" OnClientClick="disableBtn(this.id, 'Saving Idea...')"
UseSubmitBehavior="false" />