HREF Problem

T

Tomek

Hello,
I have a problem with HREF...
I have a code:
<a href='path/file.txt' >link</a>
I would like to have "save as" dialog box after click on "link" not open in
IE window.
Any ideas?
 
D

Dylan Parry

Tomek said:
I have a problem with HREF...
I have a code:
<a href='path/file.txt' >link</a>
I would like to have "save as" dialog box after click on "link" not open in
IE window.
Any ideas?

Not possible.
 
S

Saber

You need it to be a .zip, .exe or something like that. There might be a way
with javascript, but I wouldn't know that code. If you want them to have to
download it, just make a zip file and put the file in it.
What I usually do in those situations when downloading isn't necessary, is
just add a bit of text telling people to right-click and save it. If you
don't want it in the same window if they do open it, add the target="_black"
(or whatever you use, there are a couple) attribute to the tag.
Hope this helps.
 
S

Steve Pugh

Saber said:
You need it to be a .zip, .exe or something like that.

1. That adds extra steps between the user and the data they want.
2. The user may have their browser configured to open files of those
(or any) type rather than save them.
don't want it in the same window if they do open it, add the target="_black"
(or whatever you use, there are a couple) attribute to the tag.

_black is wrong. The only values of target allowed to start with an
underscore are _blank, _self, _top and _parent. Only the first of
those will create a new window (for many but not all users). See many
previous threads for why opening a new window is a bad idea.

And please don't top post.

Steve
 
S

Saber

Steve Pugh said:
1. That adds extra steps between the user and the data they want.
2. The user may have their browser configured to open files of those
(or any) type rather than save them.

I know it does. But, for most people, it will prompt for saving if it's
that type of file. I was just telling what type of files usually download.
_black is wrong. The only values of target allowed to start with an
underscore are _blank, _self, _top and _parent. Only the first of
those will create a new window (for many but not all users). See many
previous threads for why opening a new window is a bad idea..

Black was just a typo. I meant blank. I know it's not always best to open
a new window, but with text files, some users, after they are reading it,
might close the window, thinking they are in Notepad, Word or something like
that. And, as a web designer, you do not want people to leave your site.
At least that is what I have been taught and what I read.
And please don't top post.

I use OE, and am a regular in a newgroup that doesnt care about top posting
or bottom posting, the content is what we care about. But, I'll try to
remember to bottom post when I post in here.
 
B

Ben Hopkins

I know it does. But, for most people, it will prompt for saving if it's
that type of file. I was just telling what type of files usually download.

<snip>

Why not just tell the users to right-click on the link and select "Save
Link As..."?
 
R

rf

Saber said:
I know it does. But, for most people, it will prompt for saving if it's
that type of file. I was just telling what type of files usually
download.

Most people (out of the box windows 98 or less platform) will not be able to
do anything at all with a zip file. 98 does not ship with tools that look at
zip files, one has to know how to go to download.com and install winzip or
somethiong.

Right click >save target as.

Cheers
Richard.
 
M

Mark Parnell

Saber said:
I use OE, and am a regular in a newgroup that doesnt care about top
posting or bottom posting, the content is what we care about. But,
I'll try to remember to bottom post when I post in here.

There's a lovely little program called OE-QuoteFix that will help you with
that (it has lots of other nice features too :) ).

Don't have the URI handy, but Google should turn it up pretty quickly.
 
S

Saber

Ben Hopkins said:
download.

<snip>

Why not just tell the users to right-click on the link and select "Save
Link As..."?

That is what I said in my 1st post in this thread. That's what I usually
do, but Tomek wanted to know how to make people download it, so I answered
his question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,079
Messages
2,570,574
Members
47,206
Latest member
Zenden

Latest Threads

Top