Page 1 of 1

back button does not trigger bur, unload or before-unload events

Posted: Wed Feb 05, 2014 9:47 pm
by TomMcCann

I need to have a bit of code to save the document when the user clicks the back button. I can't get it to work. To test it, I have put js code alert('event name'); in the event. Nothing triggers. The back button itself works- it navigates to previous page, but surely it should trigger these events? Can you think what I might be doing wrong? Thanks for your help.


back button does not trigger bur, unload or before-unload events

Posted: Wed Feb 05, 2014 10:08 pm
by Maryna Brodina

Hello! We tested and it works for us. Could you post screenshot which shows how did you add event?


back button does not trigger bur, unload or before-unload events

Posted: Wed Feb 05, 2014 10:50 pm
by TomMcCann

Blur triggers but not unload or 'before-unload'. Ive attached a pic of the events.

Image


back button does not trigger bur, unload or before-unload events

Posted: Thu Feb 06, 2014 6:01 pm
by Maryna Brodina

Hello! This is event for window, not page. Add necessary events using JS. For example event of page changing, see all events here http://api.jquerymobile.com/1.3/categ...