I want to attach an event on close to verify that all changes made on a form
are saved.

Something like in gmail, if you try close browser window when you are
composing an email, you get a dialog.

Thx.




On 1/19/07, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> Unai Martinez schrieb:
> > How can i detect browser close event?
> >
> > I've tried something like:
> >
> > $(window).unload(
> >    function(){
> >       alert("close");
> >       //stop event
> >       return false;
> >    }
> > );
> >
> > Alert appears, but event continues...
> >
> > Thx!
>
>
> I don't think that you can - or if my knowledge here is limited that it
> is a good idea to - stop the user from closing the window...
>
>
> -- Klaus
>
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>




--
Unai Martinez
[EMAIL PROTECTED]
http://helusinfa.blogspot.com




--
Unai Martinez
[EMAIL PROTECTED]
http://helusinfa.blogspot.com
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to