cancel
Showing results for 
Search instead for 
Did you mean: 

"javascript:window.close()" script doesnt work in firefox 3.6 and above It works in IE8 and used to work in earlier Firefox

Highlighted
New Contributor

"javascript:window.close()" script doesnt work in firefox 3.6 and above It works in IE8 and used to work in earlier Firefox

I am using <a href="javascript:window.close()"> to close the window at the completion of an online survey. I works OK in IE and used to work in Firefox. Now the script does not do anything in 3.6 and above . In IE it closes a window through a GUI

1 REPLY
Site Moderator

Re: "javascript:window.close()" script doesnt work in firefox 3.6 and above It works in IE8 and used to work in earlier Firefox

In Firefox you can only close a window that was previously opened via JavaScript

See :

https://developer.mozilla.org/En/DOM/window.close
https://developer.mozilla.org/En/DOM/window.open