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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

On Click, force a download dialog box?

Status
Not open for further replies.

jrpatdlgs

Programmer
Mar 28, 2000
62
US
Is there a way to force a download dialog box to open when the user clicks on an " link to a pdf or doc file?

Currently our website posts many large pdf files and MSWord docs which are intended to be downloaded by our user clients for printing and use at their locations. By default, browsers (IE anyway) open the linked file IF the user has the appropriate software on his pc. My boss has requested that I find a way to make a download dialog box open instead -- a standard box with "save to your hard drive" and "open" options.

In anticipation of the first question someone will ask, I'll provide the answer :^) , "No. Unfortunately, some of our users are not web savy enough to understand 'Right click' and 'Save Target as' and the boss wants to make the download as foolproof as possible -- hence the insistance on a dialog box."

Suggestions will be greatly appreciated and a detailed step-by-step even more so.

Thanks,
John
 
Zip your files


--------------------------------------------------------------------------------
aka.bmp
 
Wullie,
Thanks for the info and the link to tutorial-world. I managed to learn that content-disposition has something to do with Coldfusion -- whatever that is. By now you're no doubt beginning to suspect that I am not technically proficient in web design/authoring. Bingo. I use Dreamweaver wysiwyg to do the website. Could you possibly be more specific? Ie, do I just cut and paste the coldfusion code into my html code? If so where? Before the &quot;<a href&quot; or somewhere else. Or is Coldfusion a separate application?

Sorry for being such a complete novice but I do appreciate your trying to help.

John
 
jrp... I recommend what AlsoKnownAs said.. zip the file and have them click on that, Almost everyone has WinZip on their computer, and that would force a download.

Cold Fusion requires that your site be on a Cold Fusion server (which are slow and expensive. You are not likley on a CF server.

When in doubt, deny all terms and defnitions.
 
Hi mate,

content-disposition is a header, it's not specific to Coldfusion. You would need a server-side language to send the header though.

As for zipping the files, from the way you described them, I wouldn't count on them all having a program to unzip the files.

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
BTW, the links in my post were in the signature, they weren't meant for you to follow for this problem.

I guess you saw the Coldfusion version on that site, that is one method to send the header.

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Wullie & Violation,

Thanks to both of you for your help. I've decided to push the boss to allow the &quot;right click on the link&quot; procedure. Just curious though as to just what viol8ion is in violation of and also, where our &quot;Mate&quot; Wullie might be located (me, myself and I would, all three of us, guess Aussieland) :^)

Thanks again,
John
 
in my more reckless days I used to frequently be in violation of the terms of service....

When in doubt, deny all terms and defnitions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top