Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

Learn More

Scripts may not close windows that were not opened by script

  • 1 réponse
  • 29 ont ce problème
  • 2 vues
  • Dernière réponse par cor-el

more options

if (browserName=="Netscape") {

           function closePopup()
           {
          window.open(,'_parent',);
           window.close();

} when i am trying to close the window, using the above script.. window is not closing and saying the error message: Warning: Scripts may not close windows that were not opened by script.

please help how do i change my script to close the window.
if (browserName=="Netscape") { function closePopup() { window.open('','_parent',''); window.close(); } when i am trying to close the window, using the above script.. window is not closing and saying the error message: Warning: Scripts may not close windows that were not opened by script. please help how do i change my script to close the window.

Toutes les réponses (1)

more options

How did you open that window?

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


A good place to ask questions and advice about web development is at the MozillaZine Web Development/Standards Evangelism forum.
The helpers at that forum are more knowledgeable about web development issues.
You need to register at the MozillaZine forum site in order to post at that forum.

See http://forums.mozillazine.org/viewforum.php?f=25