PDA

View Full Version : Forcing a Download...


LodussLSU
08-28-2002, 10:14 PM
This is my situation.. I have an ftp link on a HTML page pointing to an Excel (.xls) file. I'm using document.location.href="ftp://whatever/"

When using IE, the .xls file is opened within the browser. Is there anyway to force the download dialog box to show and not have the .xls file opened in the browser. If so, is it possible to narrow down the choices to "Save" and "Cancel"? Is this cross browser compatible?

Any help is appreciated.

Thanks.

beetle
08-28-2002, 10:20 PM
yes, but I'm not sure how. I'm sure someone here does.

Note: IE will only open the file remotely if you have Excel installed, I'm sure :D

jamescover
08-28-2002, 11:30 PM
It depends on each surfer's browser configuration. It is under "file associations." Whatever program, if any, is associated with an .xls file on their computer, it will automatically open the file.

If you want to be sure that it is only available for download, just zip it up.


James
He is risen!!!

brothercake
08-28-2002, 11:35 PM
using PHP you can do this http://www.codingforums.com/showthread.php?s=&threadid=4579

LodussLSU
08-29-2002, 06:49 PM
Thanks you all for the assistance. Guess I will just have to live with this. :)