Forum Moderators: open

Message Too Old, No Replies

Javascript

How to disable the default Internet Explorer message box

         

rbharatha

2:45 pm on Jul 5, 2005 (gmt 0)

10+ Year Member



Hi All,

Iam checking out whether the user is closing the Browser Window.
If yes then Iam firing on window.unbeforeunload event and display a webpage dialog box him to save or cancel.

But when I click on the cancel button, It closes the window. Then I was looking in there is a window.event.returnValue = "". which fires this one.

I would like to disable the default Internet Explorer Message Box by using javascript.

Which says like this.
"Are you sure you want to navigate away from this page?"

Press OK to continue or Cancel to stay on the current page.

window.onbeforeunload

kaled

4:56 pm on Jul 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I hope what you are trying to do is impossible.

Kaled.

rbharatha

6:39 am on Jul 6, 2005 (gmt 0)

10+ Year Member



Hi Style Codes:

I would like to make it clear., what Iam doing.

I want to suppress the default Message box shown by the Internet Explorer. when I close the BrowserWindow by clicking on "X".

Right now Iam showing message box "You work has not saved would like to save or cancel...", to the user when he closes the browser window.

This Iam catching on window.onbeforeunload event..

But Iam unable to put the user on the same window when he clicks on the cancel button.

rgds

Ramesh