I’m wanting to show a loading indicator after the user has clicked a button that executes several SQL queries. I tried unhiding a div on button click but that doesn’t show up until all the work behind the button is complete. I also tried this solution without success – http://forums.asp.net/t/1608046.aspx/1
Any suggestions?
code
<asp:Button ID="loadButton" OnClientClick="ShowDiv()" runat="server"
onclick="loadButton_Click" Text="Go" />
<script type="text/javascript">
function ShowDiv()
{setTimeout('document.getElementById("updatediv").style.display = "inline";', 500);}}
</script>
<div ID="updatediv" runat="server" >
<img src="Images/ajax-loader.gif" /> Updating ....
</div>
code
I get the following error when using the linked solution above:

**This seemed to do the trick
code
<script type="text/javascript" language="javascript">
function ShowDiv()
$('#updatediv').show() }
</script>
code

You’ll need to have the show div on the client side, not the server side. ASP buttons have a handy
OnClientClickin addition to the server sideClickevent.This is of course what the link that you show does. If you followed it, then it shouldn’t be waiting to finish the postback to execute.