13 Comments to “Warning before navigate away from a page”

  1. Binny V A

    Jul 19th, 2008

    I wrote an article about this a while ago – Confirmation on Leaving the Current Page in JavaScript

  2. www.blipoo.com

    Aug 20th, 2008

    Warning before navigate away from a page…

    How can we prevent the navigation away from the page while doing another job…

  3. An Nguyen

    Jan 6th, 2009

    This solution help me resolved my task which I take many time to find.
    Thank you very!

  4. D.Asuncion

    Mar 12th, 2009

    Olahhhh… Nice Idea..

    Good Day, i have a question in debugging, how can i detect in code behind when i click “Ok”?

    Thanks in Advance.

  5. rich

    Mar 25th, 2009

    Thanks! Simple, works.

  6. Took

    Apr 2nd, 2009

    That what i want. Thank you very much.

  7. Emre

    Apr 16th, 2009

    Hi ,
    I need to differentiate window close and redirect to another link. Is there a way for this ?

  8. Christopher

    Jun 12th, 2009

    Thanks, nice stuff.

  9. Kaushik

    Aug 6th, 2009

    Great works for me!!

  10. Hassan

    Aug 22nd, 2009

    This code is not working for me. Please help? I pasted this code under head tag.

  11. iƧ giyim

    Aug 24th, 2009

    thank you in advance.

  12. Naidu

    Aug 29th, 2009

    hi,

    is there any way to remove this custom message completely. please mail me solution,.

    Thanks,
    Naidu
    vrsanaidu@gmail.com

  13. jeff

    Dec 12th, 2009

    is there a way this script could be modified to only warn someone when they are navigating away from MY website. If they’re navigating to another link on my site, then do not generate a warning.


Leave a Reply