I am creating a function that prevent the user when he reload the page or press a back space or press back button of Browser . i try the following code..
$wnd.beforeunload=function()
{
return "hello";
}
it is working with simply java script but not in jsni . i also used
Window.addWindowClosingHandler(new ClosingHandler()
{
@Override
public void onWindowClosing(ClosingEvent event)
{
event.setMessage("Are you sure?");
}
});
this is working with page refreh and closing, but not working with back button of browser and backspace ...pleace HELP..