Tony Frasketi wrote:
Hello Listers
I'm trying to find a way to force a download dialogue box to come up when the user clicks on a link on a web page (the link will primarily be for htm, .txt files on the server). Normally when the user left clikcs on the link the .htm or .txt file appears in the browser. And also normally when the user right clicks on the link, he is given the choice to 'Save Link Target as' in order to download the file.

What I'm looking for is to avoid right clicking and choosing to save the file.... Is there a way to implement left clicking the link and automatically bringing up a "Save As" dialogue box?

I've googled for such things as "mime type download save as.... etc" but came up with dead ends....

TIA
Tony Frasketi


Most browsers will provide this functionality if the return header is "application/octet-stream" rather than "text/html" or the like. In the case of IE you may have to fool the browser into thinking it is getting something different than it is based on the URL, because it likes to look there for a file extension to determine the file type too.

HTH,

http://danconia.org

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to