The following HTML file when opened in chrome, downloads the test.gif file. On firefox/IE, nothing happens.
<html>
<head>
<script type="text/JavaScript" language="JavaScript">
    function s() {
       var link = document.createElement('a');
       link.download = "test.gif";
       link.href = 'http://192.168.20.22/mantis/images/mantis_logo.gif';
       link.click();
    }
</script>
</head>
<body onload="s()" >
</body>
</html>
Firebug tells me that the link object is properly created and href is set, but somehow on calling link.click() nothing happens. Any idea why?
 
    