View Full Version : closing a popup window from a different page then where it was created

01-01-2004, 03:38 AM
i hope this explains what i am trying to do a little better.

i have a page that a person loggs on to and once they log on it takes all their images and compresses them. all that works fine but the thing that i am wanting done is that once they log in it takes an amount of time for the compressor to do its thing if there are a lot of images. so i want a window to pop up on the page that they log into and once the page that actually does all the compression is finshed doing its thing i want it to close the "please wait" window.

there is a total of 3 pages
default.asp - the page that opens the pop up window
loading.asp - the popup window that says please wait
main.asp - the page i want to close the pop window with

i hope this is a bit simpler

01-01-2004, 03:51 AM
(Please add the folowing script to the default.asp)
<script language="JavaScript" type="text/javascript">
var popup
popup = window.open('loading.asp' , 'newwin' , 'toolbar=0 status=0')
function closewin(){
<body onload="return closewin()">

01-01-2004, 03:52 AM
There will be no need for your main.asp page

01-01-2004, 03:56 AM
Please don't double-post the same question. I've deleted this thread's duplicate.

01-01-2004, 04:29 AM
ok i wasn't clear enough

on formsubmit it pops open the window. main page takes a while to load cause it is prossing images. i want the window to close once this page completely loads

my problem is that there are 2 different pages

01-01-2004, 04:37 AM
Hello, I found out that i may need to modify my script further. Please come back about an hour later or wait 4 some1 else.

01-01-2004, 04:58 AM
I think that the loading.asp should be opened in the main.asp(head), then closed with the <body onLoad> event handler. This way, upon entering, a popup page(loading.asp), will pop up. Then, when the page loads, the <body onLoad> event handler will close the window. Attached is an example.

01-03-2004, 08:11 PM
this would work fine if there wasn't asp on the page that actually process and which causes the page to take so much time in loading. this is where the whole problem kicks in. i will however try and i will let you know how it goes
and did you actually go and take a look at the site it sent you

01-03-2004, 08:36 PM
well the problem is still presisting so what i am going to do is implement your code and i am going to make the form only able to be subbmitted once. if you do however find anything out i will much appreciate it