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!
--
Unai Martinez
[EMAIL PROTECTED]
http://helusin
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 schr
I get it working, without jquery :: window.onbeforeunload =
function(){return "Unsaved changes."}
Thx.
On 1/19/07, David Duymelinck <[EMAIL PROTECTED]> wrote:
Unai Martinez schreef:
> How can i detect browser close event?
>
> I've tried something like:
>
niConfirm() is just a unicode-safe version of confirm()
jQuery(".crayon-changed") is the list of unsaved items, and their
associated
forms are jQuery(".crayon-changed").next()
-- Fil
_______
jQuery mailing list
discuss@jquery.com
http:
Yes, it works.
Thx.
On 1/19/07, Sam Collett <[EMAIL PROTECTED]> wrote:
On 19/01/07, Unai Martinez <[EMAIL PROTECTED]> wrote:
> I get it working, without jquery :: window.onbeforeunload =
> function(){return "Unsaved changes."}
>
> Thx.
Perhaps it should