Thanks.  I was missing the connect to the onbeforeunload function.
Somehow, I thought the confirmUnload handled that internally.

On Apr 7, 2:14 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> The reason you cant get it to work is because you need to retrieve the
> event (e) in the function that calls confirmUnload.
>
> E.g.
>
> // adding prompt on navigate away function
> connect(window, 'onbeforeunload', PromptNavigateAway);
>
> function PromptNavigateAway(e){
>     e.confirmUnload('If you have not saved your changes you will loose
> them!');
>
> }
>
> On Apr 3, 6:24 pm, "Brian Morton" <[EMAIL PROTECTED]> wrote:
>
> > I'm trying to implement the Signal module's confirmUnload in my
> > script, but I can't make it work.  I am using it in an event handler,
> > but Firefox's JS interpreter keeps saying that it is not a valid
> > function.  Can anyone provide a simple working example of how to use
> > this function?  Thanks.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" 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/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to