Click to See Complete Forum and Search --> : download tag


prymepro
12-06-2006, 11:58 AM
I fairly new to the coding matter and i was wondering if anyone could help me with finding a download tag. to where all someone has to do is click something and it brings up a download box. any help will be greatly appreciated 8)

KDLA
12-06-2006, 04:25 PM
It's not a tag. It's dependent upon one or more of these factors:
- the file type you are linking to
- server side scripting
- the viewer's browser's security settings

KDLA

Compguy Pete
12-07-2006, 11:33 PM
everyone has to start somewhere...

Make a link like you would to a page or copy this example but replace with your data.

<a href="myfile.zip">download my file</a>

It's really no different at all than linking to another page. Also I think what KDLA was getting at is that only certain files will do what your looking for... Anything like Image files and other pages will open in the browser if they're supported. Only files that are not openable in a browser will create the download box. But don't worry the box itself is created entirely by the browser and not you.

KDLA
12-08-2006, 07:51 AM
I should have been more clear in my post. :rolleyes:
To clarify:
- the file type you are linking to -- as Pete said, some will open up in your browser; some will open up in a certain program (like Word, Acrobat, etc.), when they do, the user may not think about saving it. It's best, if you want them to ONLY download, not view your stuff, to put them in some sort of format which will guarantee download only, like ZIP.
- server side scripting -- you can get around the viewing part by coming up with some scripting that forces the browser to cause the download box to come up
- the viewer's browser's security settings -- this is a big one -- sometimes, the browser will block a download, asking all sorts of questions to the viewer, intimidating the cr@p out of them. You might include something on your page saying your stuff is safe, so when the questions pop up, the viewer knows it's OK to proceed.