2

Why javascript: window.Close() is not working in Firefox, Is there any solution?

What are the parameters in window.Close()?

Wladimir Palant
  • 56,865
  • 12
  • 98
  • 126
ReniRaj
  • 27
  • 3
  • 4
    Could you be more specific? Which Firefox version are you using and where are you executing this command? In the address bar? You can [read more about `window.close()` at MDN](https://developer.mozilla.org/en/DOM/window.close). Also note that JavaScript is case sensitive, so it should be `close`, not `Close` and you can only close windows you opened with JavaScript. – Felix Kling Sep 22 '11 at 07:05
  • There is/was a workaround for closing windows that you haven't opened with javascript, but I don't know if it is still working :) – Walialu Sep 22 '11 at 07:45
  • Possible duplicate of [window.close() doesn't work on Firefox, any work around?](https://stackoverflow.com/questions/1754374/window-close-doesnt-work-on-firefox-any-work-around) – Stucco Aug 18 '17 at 15:58

2 Answers2

4

In firefox you can't close a window that is not opened by javascript(pop-up). window.close() will not work.

JNDPNT
  • 7,445
  • 2
  • 34
  • 40
1

Probably because it is window.close() - with a lower-case c. JavaScript is a case-sensitive language, close and Close are not the same thing.

Wladimir Palant
  • 56,865
  • 12
  • 98
  • 126