|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
On my page I have a login section set up. If the login is valid a cookie is placed on the users machine so that they may freely view the restricted area. When the "logout" the cookie is deleted. Every page that I chose checks to make sure users have this cookie and if not they are redirected back to the login page (which itself closes after 20 seconds or 3 invaild inputs). HOWEVER, if the user doesnt click logout the cookie stays there. I am looking for a script that knows when the window is closed so I can call the delete cookie function. Basically a script to execute after a window has been closed. How do I do this??
|
|
#2
|
||||
|
||||
|
Have you checked into the onunload event?
|
|
#3
|
|||
|
|||
|
Excellent. Didnt even think of it
Thank you good sir. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > function AFTER window close. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|