Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Vyhľadajte odpoveď

Vyhnite sa podvodom s podporou. Nikdy vás nebudeme žiadať, aby ste zavolali alebo poslali SMS na telefónne číslo alebo zdieľali osobné informácie. Nahláste prosím podozrivú aktivitu použitím voľby “Nahlásiť zneužitie”.

Ďalšie informácie

Scripts may not close windows that were not opened by script

  • 1 odpoveď
  • 29 má tento problém
  • 2 zobrazenia
  • Posledná odpoveď od 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.

Všetky odpovede (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