PDA

View Full Version : I am using ext-gwt and I want to close my browser window on ext-gwt button click



vijaypatil12
28 Sep 2011, 2:17 AM
how I can achive that in ext-gwt, please help

micgala
28 Sep 2011, 3:08 AM
Hi.
You cannot close the browser. You can close the window if your application is running on a popup.
Try doing it via jsni:



private static native void closeWindow() /*-{
$wnd.close();
}-*/;

vijaypatil12
28 Sep 2011, 5:19 AM
Thanks for reply, it is working fine in IE, but not working in FF 3.5.3

what i can do for ff

Thanks
vijay patil

micgala
28 Sep 2011, 5:55 AM
FF does not allow scripts to close the window.
If you want to bypass this default setting, type about:config in ff.
Then make sure the "dom.allow_scripts_to_close_windows" property is set to true

vijaypatil12
2 Oct 2011, 8:57 PM
Thanks, it's working for me