html - How to close a popup window in javascript that was sent to the background -


so trying use window.close method, doesn't seem working. here's code:

    <script>         var popup;         function openpandora() {             popup = window.open('http://www.pandora.com', '', 'width=100, height=100, resizable=no');             popup.blur();             document.getelementbyid('container').focus();         }         function closewindow() {             popup.close();         }      </script> 

the html calls <a> onclick="closewindow();"

any ideas on how popup close? thanks!

are sure if closewindow() getting called.

try this

function closewindow() {    alert("going close popup");    alert(popup);    popup.close();   } 

what see?


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -