you can't close a browser with CF. CF runs on the server. By the time the
page gets to the browser, CF has done it's thing and enjoying a drink and a
smoke.
You can use JS to close it automatically...
<script language="JavaScript" type="text/javascript">
window.close();
</script>
just put that snippet after your CF 'form action' code.
A few caveats...unless the window was originally spawned with JS, the user
will be prompted with a "This page is trying to close itself...OK to allow?"
confirmation message.
You might want to consider running your CF code...then displaying a message
to the user that the insert/update/delete action was successful, and provide
them with a button to close the window themselves:
<input type="button" value="close window" onclick="self.close();" />
Your call, of course...but I think the button is the better option of the
two.
Charlie
----- Original Message -----
From: "Wurst, Keith D." <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, July 25, 2003 11:39 AM
Subject: closing a browser with CF
> i would like to close an IE browser after an action page (that updates
some
> tables) is run. any suggestions on how to do this? i was thinking of using
> javascript but im not sure how to get the window.close to run on my cf
> action page. thanks.
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community.
http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4