I just did something like that because a client hated to click print
when the clicked a printer friendly page button.
BUT I needed to send the page through cf to format for print since it
was complex.
I personally had the button clicked or page or action called and
appended a variable - like in your case - ClosePage
then added a small if statement in the body tag like
<html>
<body <cfif ClosePage EQ 1>onload="window.close();"</cfif>
This way I didn't have to create an entire page for the action and the
same page handled everything.
Just a simple view that may help out.
s. isaac dealey wrote:
> CF doesn't have any native means of interracting with the browser, so you have to
> resort to some sort of client scripting to accomplish that... It shouldn't be too
> tough, usually something like this works:
>
> <html><body onload="window.close();"></body></html>
>
> or this:
>
> <script language="javascript">
> function myonload() { window.close(); }
> window.onload=myonload;
> </script>
>
> hth
>
> Original Message -----------------------
> 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
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
http://www.cfhosting.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4