On 2 avr, 17:39, Juzlim <[email protected]> wrote: > When the user presses the back button on their browser, I'd like to be > able to pop-up a confirmation message. If they cancel, then I'd like > them to stay in their current state. What is the easiest way of doing > this? In other words, how can you prevent the back button from > invoking "onHistoryChanged" upon confirmation?
I'm afraid you just can't. Though you can eventually keep a global boolean flag and in onHistoryChanged, if the flag is true, your pop-up your confirmation dialog and newItem to the correct state (note that you'll lose the "forward" history). If I were your, I'd try to reverse-engineer what GMail does for their "new message" page, if that's the kind of behavior you'd like to achieve (I haven't tried using history while composing a mail in GMail, but I suspect it'll just save the changes as draft). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
