I have a zend framework project and I am loading some javascript in a page. How do I close that page from inside the javascript code?
window.close() only works when the current window/tab/page was opened with window.open(), that not being my case, it’s not a solution.
Any other solution?
There are ways to do this, but they are “hack”ish.
javaScript can not, for security reasons, close a window that it did not open. You can, however, use a trick to make the browser think your current window was opened by javaScript: