<[EMAIL PROTECTED]> wrote:
> if I put that script in the popup file then its just open and then closed
>
> I have a index.cfm file, if the form submits, it popup the window and include upload.cfm
>
> so, what I was doing is putting that script at the bottom of index.cfm coz if I put that script in popup.htm then popup just open and close in a second.
OK so you have a MAIN window which you use to pop up a CHILD window
and upload a document. When that document is uploaded you want the
MAIN window to close the CHILD.
In order to do that, you need to keep a pointer in the MAIN window
referencing the CHILD window so you can do CHILD.close(); when the
upload is done. The problem you are facing is that by
refreshing(submitting the form) the contents of the MAIN window you
are loosing a pointer to the CHILD.
There are different ways to keep the pointer on the CHILD. You can
use a frameset which has MAIN as one of its child and leave the
pointer in MAIN's parent which you don't refresh. You could use an
IFRAME inside MAIN to submit your upload form to (use it as target)
which alerts its parent, MAIN, when its done uploading. If your using
CFMX, why not submit the upload in the popup and use CFFLUSH to
display a message and when the upload is done then send a
"this.close()" script statement as the last FLUSH to the popup.
--
Marc Campeau
Vertabase, project management made easy. - http://www.vertabase.com
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

