Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

how to close a main window using javascript.

  • 2 replies
  • 33 have this problem
  • 17 views
  • Last reply by cor-el

more options

Has anyone found a work around for this. I have a main window with a close button but I have tried many versions of closing with javascript and it wont let me in FF.

It says "scripts may not close windows that were not opened by script."

This works in every other browser but FF

I have tried opening this main window two ways. 1. key in url directly 2. coming from another page with a < a href link

Is there a work around?

Has anyone found a work around for this. I have a main window with a close button but I have tried many versions of closing with javascript and it wont let me in FF. It says "scripts may not close windows that were not opened by script." This works in every other browser but FF I have tried opening this main window two ways. 1. key in url directly 2. coming from another page with a < a href link Is there a work around?

Modified by the-edmeister

All Replies (2)

more options

If that page didn't open a new window with a script, Firefox isn't going to allow a script on that page to close that window.

Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox.
http://forums.mozillazine.org/viewforum.php?f=25
You'll need to register and login to be able to post in that forum.

more options