user964904
user964904

Reputation: 925

customize window closing event message in IE?

i am using GWT. on window close we get browser provided message" Are you sure you want to navigate away from this page?". i want to replace the message with my own message. please help me. below is my code.

Window.addWindowClosingHandler(new Window.ClosingHandler() {
            @Override
            public void onWindowClosing(final Window.ClosingEvent closingEvent) {
                                                        closingEvent.setMessage("some message.");
                    }

        });

Upvotes: 1

Views: 609

Answers (1)

Daniel Kurka
Daniel Kurka

Reputation: 7985

you can not modify the dialog that is opened if you provide a string in the closing event.

The dialog is handled by the browser and can not be customized.

Upvotes: 2

Related Questions