<html>
<head>
<script language="javascript">
function ShowLoadingDiv()
{
document.getElementById("dvLoading").style.display = "";
}
</script>
</head>
<body onload="ShowLoadingDiv();">
<div id="dvLoading" style="position:absolute;display:none;margin-left:auto;margin-right:auto;width:200px;height:200px;border:1px solid#000;background-color:#eee;">
Please wait....
</div>
<iframe src="iframepage.html"width="500" height="500"frameborder="1"></iframe>
</body>
</html>
<html>
<head>
<script language="javascript">
function HideLoadingDiv()
{
alert("Closing the waiting div");
parent.document.getElementById("dvLoading").style.display ="none";
}
</script>
</head>
<body>
<p>
This is the page within the iframe.
</p>
<script language="javascript">
//I have used setTimeout so that the LaodingDiv staysopen for 3 seconds
//Usually just use the line commented out below it:
setTimeout("HideLoadingDiv()", 3000);
//HideLoadingDiv();
</script>
</body>
</html>
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (1)
Author
Commented: