[jQuery] Re: Browser refresh

2009-10-21 Thread lukas
Thank you also for this great link! On Oct 21, 3:50 pm, James wrote: > Try the onbeforeunload > event:http://www.hunlock.com/blogs/Mastering_The_Back_Button_With_Javascript > > This will execute before the user's request is actually sent, giving > them the option to cancel the request. > As men

[jQuery] Re: Browser refresh

2009-10-21 Thread lukas
Thanks for your quick response! It helped!! On Oct 21, 3:20 pm, KeeganWatkins wrote: > hi lukas, > > you can't specifically listen for refreshes, but you can listen for > unload events. an unload event is dispatched when: > > - a link is clicked to navigate away from the page > - the window.loca

[jQuery] Re: Browser refresh

2009-10-21 Thread James
Try the onbeforeunload event: http://www.hunlock.com/blogs/Mastering_The_Back_Button_With_Javascript This will execute before the user's request is actually sent, giving them the option to cancel the request. As mentioned, you can't really specifically listen for a refresh, only "the leaving the

[jQuery] Re: Browser refresh

2009-10-21 Thread KeeganWatkins
hi lukas, you can't specifically listen for refreshes, but you can listen for unload events. an unload event is dispatched when: - a link is clicked to navigate away from the page - the window.location property is changed - the tab is closed - the browser window is closed - etc to play around w