Re: ClosingHandler to prevent user from navigating away

2009-10-09 Thread francescoNemesi
Is there a way to post process user confirmation of the confirmation message box? Thanks On Oct 8, 8:49 pm, Marcelo Sena marceloslace...@gmail.com wrote: Thanks, that solves the problem. --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: ClosingHandler to prevent user from navigating away

2009-10-09 Thread Thomas Broyer
On 9 oct, 15:37, francescoNemesi nem...@yahoo.com wrote: Is there a way to post process user confirmation of the confirmation message box? Thanks Using a timer? If the user cancels the navigation, the timer will run (and because the confirmation is synchronous/blocking, your timer won't fire

Re: ClosingHandler to prevent user from navigating away

2009-10-08 Thread Marcelo Sena
Yes but I can't stop the event afterwards. This page illustrates what I want to do https://developer.mozilla.org/en/DOM/event.preventDefault On Sep 25, 2:41 pm, daniel d.brelov...@googlemail.com wrote: make sure you use ClosingHandler and not CloseHandler... if a ClosingEvent arises set a

Re: ClosingHandler to prevent user from navigating away

2009-10-08 Thread Thomas Broyer
On 8 oct, 14:13, Marcelo Sena marceloslace...@gmail.com wrote: Yes but I can't stop the event afterwards. This page illustrates what I want to dohttps://developer.mozilla.org/en/DOM/event.preventDefault ClosingEvent::setMessage(String) with a non-null message will cause preventDefault() to

ClosingHandler to prevent user from navigating away

2009-09-25 Thread Marcelo Sena
Hi, I have a classical situation where the user is trying to navigate away from a page while some of his works are not saved. How do I stop him from doing that. I tried to use the ClosingHandler, but unlike the deprecated closing Listener it does not give me the option to stop the event. Help :(

Re: ClosingHandler to prevent user from navigating away

2009-09-25 Thread daniel
make sure you use ClosingHandler and not CloseHandler... if a ClosingEvent arises set a message on the event - this will cause the browser to show a dialog with your message where the user have to confirm that he wants to leave the page On 25 Sep., 16:22, Marcelo Sena marceloslace...@gmail.com