1) In HTML Header, before HTML Body, hourglass cursor
<script language="javascript">
document.body.style.cursor = 'wait'
2) Add "Please Wait" Label (Visible = true)
<asp:label id="lblPleaseWait" Text="Loading data, please wait..." ForeColor="Red" Visible="True" CssClass="labelCopy"
Runat="server" Font-Size="Medium">...please wait...</asp:label>
3) At end of HTML Body, make label not visible, default cursor
<script language="javascript">
document.getElementById('lblPleaseWait').style.display="none";
document.body.style.cursor = 'default'
</script>
</body>
Method 2:
1) add div id="pleasewaitScreen" with
b. desired “please wait text”
<div id="pleasewaitScreen" style="width:100%;text-align:center;visibility:visible">
<font face="Arial" color="blue"><b>Loading graph, please wait...</b></font>
</div>
2) In header section:
a. Add JavaScript function Check_Img()
i. At the right time
1. Sets visibility:hidden when right time
2. Sets wait cursor (houglass) back to default
b. and call function Check_Img()
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" language="javascript">
function Check_Img() {
var imgTags = document.all.tags("IMG")
//Then get count of tags
var iImgTagCount = imgTags.length - 1
//Loop through Collection
document.body.style.cursor = 'wait'
for (h=iImgTagCount; h > -1; h--)
{
if (imgTags[h].complete)
{
clearInterval(img_timer)
document.body.style.cursor = 'default'
document.all.pleasewaitScreen.style.visibility="hidden";
}
}
}
img_timer = setInterval('Check_Img()', 250)
</script>
</head>