WagnerAlexandre Posted July 2, 2014 Share Posted July 2, 2014 is there any example to close the browser window? Quote Link to comment Share on other sites More sharing options...
wangxuebin Posted July 3, 2014 Share Posted July 3, 2014 JS:window.close(); Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 3, 2014 Share Posted July 3, 2014 JS:window.close(); This method is only allowed to be called for windows that were opened by a script using the window.open method. If the window was not opened by a script, the following error appears in the JavaScript Console: Scripts may not close windows that were not opened by script. https://developer.mozilla.org/en-US/docs/Web/API/window.close If you are using Mozilla Firefox, enter in the about:config and modify dom.allow_scripts_to_close_windows property to true, then you can use window.close() ... Quote Link to comment Share on other sites More sharing options...
WagnerAlexandre Posted July 3, 2014 Author Share Posted July 3, 2014 Is there any way to close the browser with the MainForm in Unigui? Quote Link to comment Share on other sites More sharing options...
DoiSuthep Posted March 23, 2017 Share Posted March 23, 2017 I have situation where I would like to save silently some cookies for default browser. With certain QueryPamams I save cookies and terminate application in UniGUIMainModuleBeforeLogin: UniSession.UniApplication.Terminate('<script>window.top.close()</script>'); But it is not allowed to close browser tab/window. Instead redirect there works like below but it is not silet as I wish: UniSession.Terminate('<script>window.location.href = "http://google.com";</script>'); Is there a way to close browser window or other ways to save cookies silently? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 24, 2017 Administrators Share Posted March 24, 2017 You can save cookies using uniGUI. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.