i've try that, but the logout.cfm is run even when the page is changed, for
example if a user go to page2.cfm form page1.cfm, the OnUnload event is
executed.


-----Original Message-----
From: Tim Painter [mailto:[EMAIL PROTECTED]]
Sent: 12 April 2002 19:32
To: CF-Talk
Subject: Re: capture close browser event


You can use the OnUnload event in the body tag to run something.

<body OnUnload = "window.open('logout.cfm','logout_href');">

----- Original Message -----
From: "Mak Wing Lok" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, April 12, 2002 7:21 AM
Subject: capture close browser event


> is there a way where we can capture the event when a user close a browser?
> or when the user close a browser the CF application will execute a cf
page?
> for example logout.cfm?
> i try using the code below :
>
> <SCRIPT FOR=WINDOW EVENT=ONBEFOREUNLOAD LANGUAGE="JAVASCRIPT">
> window.open('logout.cfm','logout_href')
> </CFSCRIPT>
>
> but eventually the code above will be executed whenever a page is refresh
or
> changed, i'm following the tutorial from cfvault.com but it does not
really
> work the way i want, yes, i managed to logout the user when the browser is
> closed but i logout the user too whenever a page is changed.
>
> any help?
>
>
> --------------------------------------------------------------------------
-
> "Pharmaniaga Berhad, your integrated healthcare provider"
> www.pharmaniaga.com.my
> "www.ehealth4all.com, your most convenient way to healthcare, everyday..."
> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential or privileged material.
> If you received this in error, please contact the sender and delete the
> material from any computer. Any review, retransmission, dissemination or
> other use of, or taking of any action in reliance upon, this information
by
> persons or entities other than the intended recipient is prohibited.
> --------------------------------------------------------------------------
-
> 

______________________________________________________________________
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
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to