javascript - how to close current window after href to a download link -


i have html code this:

<script type="text/javascript">     initpage(); // someting      location.href = "http://mail//download.php?lcaction=5" //download file link     // window.open("http://mail//download.php?lcaction=5");      // close current window, can not work     window.opener = null;     window.open("", "_self");     window.close(); </script> 

when try use window.open instead of href, works in chrome, fails in ie.

what can make work properly?


Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -