download URL works when pasted/entered in browser address bar, but not in href or window.open or Location
<p>why download URL works when pasted/entered in browser address bar, but not in href or window.open or Location
if i have a html file with this code</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;script type="text/javascript" language="JavaScript"&gt;
        function clickedButton()
        {
        window.location = 'http://s1.mihandownload.com/2012/Feisal/October/JetBrains_WebStorm_5.0.2_www.MihanDownload.com.rar'
        }
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;input type="button" value="Login" onClick="clickedButton()"/&gt;
&lt;/body&gt;
 &lt;/html&gt;
</code></pre>

<p>and open it by double click my download link work 
but if i load page in localhost or server my link not working</p>
