473,378 Members | 1,346 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

File Download from my Site

2
Hi guys,

Looking for a bit of simple help no doubt.

I need a function on my site to enable users to download files, beit a Word Document, Powerpoint Presentation or likewise.

I have used the following with success:

<a href="downloads/SkillatArms.doc">Download</a>

However, within the past few months I have now noticed that when users click on the above link, instead of them being presented with a Dialog box asking whether they want to Save the file or Open it, instead the browser directs them to a new page displaying the word document.

How do I get round this, or alter my code to enable them to download the file opposed to viewing it??

A simple question I'm sure for those more experienced!!!

With regards,

Zimmo
Nov 28 '06 #1
6 1743
Is the behavior the same in all browsers?
Nov 28 '06 #2
Chrisjc
375 256MB
Hi guys,

Looking for a bit of simple help no doubt.

I need a function on my site to enable users to download files, beit a Word Document, Powerpoint Presentation or likewise.

I have used the following with success:

<a href="downloads/SkillatArms.doc">Download</a>

However, within the past few months I have now noticed that when users click on the above link, instead of them being presented with a Dialog box asking whether they want to Save the file or Open it, instead the browser directs them to a new page displaying the word document.

How do I get round this, or alter my code to enable them to download the file opposed to viewing it??

A simple question I'm sure for those more experienced!!!

With regards,

Zimmo
I used to get the same problem the other thing I found that worked nicely is if you take your word file or any other file that you have this problem with, and put it in a ZIP file and point to that ZIP folder. This will then ALWAYS show the option menu to your user. I my self do not know of any other way to force that option. VIA HTML

Example
Expand|Select|Wrap|Line Numbers
  1. <a href="downloads/SkillatArms.zip">Download</a>
and in side the zip of course would be the file SkillatArms.doc


Hope that helps!

Chris
Nov 29 '06 #3
I generally never click on a "download" link. You could instead instruct visitors to place their mouse / pointer over the link, right-click, which will bring up a menu, and select "save target as" from the list of options.

There may also be a browser option set to instruct the browser to specifically open a linked document instead of offering the download option?
Dec 1 '06 #4
AricC
1,892 Expert 1GB
Why would you never click a download link?
Dec 1 '06 #5
It is a matter of control. Some times download links have other functions associated with them that I would rather not deal with. So, I do the "save target as" routine, where ever possible, so I know exactly what is going to happen next. Some times you don't have this choice, if a link does not attach directly to a file, but I like to avoid it whenever I can.
Dec 3 '06 #6
Zimmo
2
Many thanks guys for your help! Typical after I posted this message (seeing as i'm new to this site) I forgot where this site was!!!!!! lol.

I think the idea Zipping the file and then using that could be the best way to go - If I start telling my target audience to Right Click and then save target as it would confuse them!!!!!!

Once again many thanks, and here's to my next problem!!!

Regards,

Paul
Dec 18 '06 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: peetm | last post by:
I'd like to write to a log whenever a visitor to my site downloads a file. So, I'd like the link they click to be to a php 'page' that returns the file. Don't know how to do that! Side...
2
by: RickL | last post by:
I have an ASP application that uploads a specified file to the server. To retrieve the file, I simply assign the filepath and file to a hyperlink on the page. When you click "Save Target As" for...
1
by: Vasu | last post by:
Hi, I have a requirement to download a file from the web site using a client tool. Iam writing a C# program to download using WebRequest, HttpRequest, WebResponse and so on. The problem...
0
by: jmd | last post by:
Hello. I want to write a C# program that does completely automatically what, until now, I do manually, witch is describe below : 1. I launch IE (6) 2. I browse to my desired download page, say...
0
by: CodeMotion | last post by:
I have access to an internet directory and files will be placed in this directory periodically. I am writing a service to poll that directory and download the files for processing. I have figured...
18
by: jmd | last post by:
Hello, I posted the following in the C# forum but without one answer. But perhaps now in vb.net someone has some guidelines ! This is my question : I want to write a vb.net program that does...
4
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the...
21
nathj
by: nathj | last post by:
Hi, I am currently working on a new site that offers various files for download. The file information is stored in a MySQL database and the page is produced in PHP depending on how the user got...
9
by: tomhawkins1 | last post by:
Hi I currently have a site where users can upload files. These files can be doc, wmv, jpeg, xls, dwf, dwf and dwg. These files are uploaded to /home/**user**/uploads and not /home/...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.