Pages

Friday, September 6, 2013

Show loading image for 5 secs after button click

function showLoading() {
 document.getElementById('myHiddenDiv').style.display = "";
 setTimeout('document.images["myAnimatedImage"].src="work.gif"', 500000000);  
}


<span id='myHiddenDiv' style='display: none;' align="Center">
 <img id="myAnimatedImage" src="Images/ajax-loader.gif" align="middle" alt="" />
</span>


<asp:Button ID="btnUpload" runat="server" Text="Submit" CssClass="button" OnClientClick="return showDiv();" />

No comments:

Post a Comment