I urgently need a piece of JS that will close the window when a user clicks a button.
Using window.close works but it gives an alert box to ask the user if they want to close the window. Is there a way around this?
document.images is an IE check, thus the solution (if it really works, it seems a bit of a weirdy) would only work in browsers that have this DOM in place.
Thanks guys, I have looked into it a bit more and it does seem impossible as the thing is being designed without any knowledge of the targets environment.
Originally posted by glenplake I urgently need a piece of JS that will close the window when a user clicks a button.
Using window.close works but it gives an alert box to ask the user if they want to close the window. Is there a way around this?
Thanks in advance!
GP
Javascript ask that when you try to close a window which hasn't opened via javascript, ie, by window.open command (security reasons)
Is that your case?
Bookmarks