I have an asp page that's extracting data via scripts from a database, the extracts takes awhile to populate the page (variable time from seconds to minutes).
To keep the user informed I've created a pop-up box that asks them to 'please-wait' and once the data extracted has populated the page I'm able to close the pop-up. Where I'm struggling is if the users aborts the original page, by either hitting 'back' or their 'home icon' on the toolbar, the stop button, or indeed the 'x' on the top right of the window before the page finishes loading, the pop-up box remains in place. See code below.
How do I close the pop-up if the openner is closed or 'aborted' from? I tried
with no success. Can it be done from the pop-up so it closes itself if it's openner 'disappears'?
Jason.
To keep the user informed I've created a pop-up box that asks them to 'please-wait' and once the data extracted has populated the page I'm able to close the pop-up. Where I'm struggling is if the users aborts the original page, by either hitting 'back' or their 'home icon' on the toolbar, the stop button, or indeed the 'x' on the top right of the window before the page finishes loading, the pop-up box remains in place. See code below.
How do I close the pop-up if the openner is closed or 'aborted' from? I tried
Code:
<BODY onUnLoad="closeNewWindow()">
Jason.
Code:
<HTML>
<HEAD>
<TITLE>List of Invoices</TITLE>
<SCRIPT LANGUAGE="JavaScript">
var newWindow
function makeNewWindow() {
newWindow = window.open("inprogress.htm","","height=200,width=300")
}
function closeNewWindow() {
if (newWindow) {
newWindow.close()
}
}
</SCRIPT>
</HEAD>
<BODY>
<script Language="javascript">
makeNewWindow()
</script>
<%Call subDataExtract(variable)%>
<script Language="javascript">
closeNewWindow()
</script>
</body>
</html>