p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_components thread: using onunload


Message #1 by "rikki" <rsf003@y...> on Fri, 8 Mar 2002 17:59:54
hi i have my web page and need for when the user leaves my page by either 

changing the url or closing the browser that before they do my asp script 

will be executed.  Is there an onUnload function i can use in asp like 

there is for vbscript? and how would i write this code, if not how can i 

get vbscript variables to be read by asp or get the vbscript onunload 

event to execute the asp?

thanks
Message #2 by "O'Hara, Elliott M" <EMOHARA@k...> on Fri, 8 Mar 2002 12:59:08 -0500
if you have session state enabled, you can use 

Sesson_OnEnd



and put your asp code there



otherwise you can use the body on UnLoad event just call a page that

executes the code

... but this isn't very gracefull and I wouldn't recommend it. When users

leave, they want to leave, not have you sending them other places....



-----Original Message-----

From: rikki [mailto:rsf003@y...]

Sent: Friday, March 08, 2002 1:00 PM

To: ASP components

Subject: [asp_components] using onunload





hi i have my web page and need for when the user leaves my page by either 

changing the url or closing the browser that before they do my asp script 

will be executed.  Is there an onUnload function i can use in asp like 

there is for vbscript? and how would i write this code, if not how can i 

get vbscript variables to be read by asp or get the vbscript onunload 

event to execute the asp?

thanks

 



EMOHARA@k...


$subst('Email.Unsub')






$subst('Email.Unsub').

Message #3 by "rikki" <rsf003@y...> on Fri, 8 Mar 2002 19:23:45
How can i enable this session state? and where would i write it's code?

thanks

> if you have session state enabled, you can use 

> Sesson_OnEnd

> 

> and put your asp code there

> 

> otherwise you can use the body on UnLoad event just call a page that

> executes the code

> ... but this isn't very gracefull and I wouldn't recommend it. When users

> leave, they want to leave, not have you sending them other places....

> 

> -----Original Message-----

> From: rikki [mailto:rsf003@y...]

> Sent: Friday, March 08, 2002 1:00 PM

> To: ASP components

> Subject: [asp_components] using onunload

> 

> 

> hi i have my web page and need for when the user leaves my page by 

either 

> changing the url or closing the browser that before they do my asp 

script 

> will be executed.  Is there an onUnload function i can use in asp like 

> there is for vbscript? and how would i write this code, if not how can i 

> get vbscript variables to be read by asp or get the vbscript onunload 

> event to execute the asp?

> thanks

>  



> EMOHARA@k...


> $subst('Email.Unsub')

> 




> $subst('Email.Unsub').


  Return to Index