Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Download file

Status
Not open for further replies.

Albano

Instructor
Dec 11, 2000
221
PT
Hello,
I have a script that let the user download a file, but the problem is if the cliente have a program associented with the file (eg. Word associeted with doc) que browse simple open the programme, so what i need to know is how can i download the file (with the left mouse button) with out open the associeted program.

Tanks in advance.

Albano
 
I think the general concensus is to zip the file. This question has been asked several times, and short of very complicated (and questionable) solutions, I think that zipping the file is the quickest and neatest of them all.

good luck! :)
Paul Prewett
penny.gif
penny.gif
 
Thanks for the tip, but I need to make the dounload without ziping or changing the file extension, any sugetions.

Thanks
ALbano
 
Tell the user to right-click on the link and select "Save Target As...." from the popup menu.

Chip H.
 
You can also set the onClick event of the link to false to prevent the link being opened. Right-click and 'Save Target As..." still works fine. Be sure to advise the users how to download the file as many may not know how to.

eg...
Code:
<A HREF=&quot;example.doc&quot; onClick=&quot;return false;&quot; TITLE=&quot;To download this file, right-click and select Save Target As...&quot;>Link 1</A>

Hope this helps

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top