Hi all,
I have this page that a user uses to upload a PDF. I want a small popup to come up when they hit the upload button to promt the user to wait. This part is fine and works but I need the popup to close when the upload is complete. The way I have aproched it is to have a function that pops the window up:
Code:
function waitPop(page){
var intScrWidth = (window.screen.width/2) - (100 + 10);
var intScrHeight = (window.screen.height/2) - (25 + 40);
var waitAlert=window.open(page,"winname","width=200,height=50,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,left=" + intScrWidth + ",top=" + intScrHeight + ",screenX=" + intScrWidth +",screenY=" + intScrHeight);
//bring the newly opened window into focus(front of the screen)
waitAlert.focus();
}
and then a function called with <body onUnload="closeWait();"> as seen below
Code:
function closeWait() {
waitAlert.close();
}
I have followed the advice in a prior post and put
to create a global variable above these two functions.
So the popup comes up but will not shut for anything. Any help will be much appreciated cheers
Slarti
Bookmarks