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

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -