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
Post a Comment