logo

New Response

« Return to the main article

You are replying to:

  1. Hi,

    I am trying to invoking the onbeforeunload event handler on a page and want to show a custom message to the user: "Changes you made to this page were not saved.\n\n Press OK to continue without saving, or Cancel to return to the page and save.".

    I want to suppress the browsers own 2 messages:

    1. "Are you sure you want to navigate away from this page?"

    2. "Press OK to continue, or Cancel to stay on current page".

    Right now, my custom message appears in between the above 2 messages. Is it possible to suppress the aboove 2 messages.

    Plz help.

    Thanks

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: