[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 227
  • Last Modified:

Link to a doc file

I have a Link to a WordFile which resides on the server.

When i click on the link the Word file opens in the browser window itself instead i want my browser to prompt me wheather to save or to open.

My Html Code

<A HREF="">Click Here to Download</A>

  • 3
1 Solution
try this piece of PERL code

you also need to change HMTL tag to the foll....

<A HREF="">Click Here to Download</A>


## The full path to that doc file

## Show some unknown MIME header
print "Content-type: junk/trash\n\n";

open(FILE,$doc_file) || die $!;
binmode (FILE); ## Read the file in binary mode

  print $_; ## Print the content of the file
close (FILE): should be

LotsOfQuestionsAuthor Commented:
That is Fine Mahesh

When the Browser prompts me i will be able to save the file to a disk when i select the "Save Option",

But What if i select the "Open Option",

When i select the "Open Option" the browser prompts me again with a
 "OPEN WITH DIALOG BOX" instead the
browser must launch the application, how do i do that.
sure. if you are using Netscape you will see a dialog box with 4 buttons. One button has the caption "Pock App..."

Click on that button, then click on Browse, let say you want that file to be opened by Excel, you just type in the full path to Excel.exe and click on OK!!

The next time whenever a file of that MIME type is being downloaded, your browser will automatically launch the app for you and open the file in it.!!


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now