You could do:

<cfquery name="myQuery" datasource="#dsn#">
...
</cfquery>

<html>
<head>
<script language="JavaScript" type="text/css">
<!--
function unLoad(){
        var thankYouPage = "thankyou.cfm";
        window.opener.location = thankYouPage;
        window.close();
}
//-->
</script>
</head>
<body onload="unLoad();">
</body>
</html>

In IE, you can ditch the <html> and <body> tags and just write the
<script>, however NN 4.7 is crappy when dealing with inline JS code,
hence the body onload and the function.

HTH! 

-----Original Message-----
From: W Luke [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, March 02, 2002 12:00 PM
To: CF-Talk
Subject: Re: Refreshing parent window on close

Thanks Shawn.  I found the following works well, but only when I
manually
close the pop-up window.  How can I get it to refresh the parent, and
close
the popup, right after a cfquery? (in case I didn't make myself clear,
it'll
be after a form-submit - so perhaps there's a JScript function I could
use
that ties in with the form?)

<body onUnload="window.opener.location.reload(); window.close()">

Will

----- Original Message -----
From: "Shawn Grover" <[EMAIL PROTECTED]>
Newsgroups: gradwell.lists.cftalk
Sent: Saturday, March 02, 2002 6:58 PM
Subject: RE: Refreshing parent window on close


> In the popup window's onClose event (or onUnload... I can never
> remember
> which), enter this line:
>
> self.opener.refresh();
>
> Or, alternately, self.opener.location='originalPageURL.cfm';
>
> Hope that helps.
>
> Shawn Grover
>
> -----Original Message-----
> From: W Luke [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, March 02, 2002 11:50 AM
> To: CF-Talk
> Subject: Refreshing parent window on close
>
>
> Hi,
>
> On one page I'm doing at the moment, there's a bunch of <cfifs> - in a
> certain instance it will produce a button which, when pressed, will
pop
> up a
> window.  After the user has done what they need to do in the
> popped-up-window, I need it to close and for the original parent
window
> to
> be refreshed.
>
> Any ideas how?
>
> Thanks
>
> Will
>
> ---
> "A woman drove me to drink and I didn't even have the decency to thank
> her." --W.C. Fields
>
>
> 

______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to