The answers linked in the comments explain why this can't be done in Javascript and instead that it needs to be done on the server-side. This one in particular explains why this is the case:
https://stackoverflow.com/a/5192922/560114
I just wanted to add that there is one way to initiate a download on the client-side, but it requires the use of Flash, and it probably wouldn't help you here because its purpose is to make it possible to download text files that you've generated using Javascript:
https://github.com/dcneiner/Downloadify
If it's a remote file, then the best way to force the download would be to have the server read it into memory and then output it with the headers necessary to force a download. Whether it's local or remote, at minimum the header from the server needs to include Content-Disposition: attachment
. Here's a cross-browser example in PHP:
http://davidwalsh.name/php-force-download