| View previous topic :: View next topic |
| Author |
Message |
curtranhome
Joined: 04 Jun 2008
Posts: 76
|
| Posted: Sat Nov 15, 2008 12:16 pm Download file code |
|
|
Hey people,
I want to try and get my site to download a file when a link is clicked, something like the torrent sites.
can any1 help me plz
thnx alot ahead of time, and srry if this is in the wrong forum |
|
|
PayneLess Designs
Joined: 28 Feb 2007
Posts: 4235
Location: MS
|
| Posted: Sat Nov 15, 2008 1:02 pm |
|
|
I don't use torrents at all. Too much malware picked up through them.
If you just want people to download a file, put that file in a format that will trigger the browser's download function. Normally a zipped format will do it: Code: <p><a href="file_name.zip" title="Mouseover Description">Download "File Name" (File Size: XXKb)</a></p> If you have lots of files for download, I recommend using a nice style div container and an unordered list: Code: <div style="width: XXpx; margin: 2%; padding: 5px;">
<h3>Download Files Here:</h3>
<ul>
<li><a href="file_name.zip" title="Mouseover Description">Download "File Name" (File Size: XX Kb)</a></li>
<li><a href="file_name.zip" title="Mouseover Description">Download "File Name" (File Size: XX Kb)</a></li>
<li><a href="file_name.zip" title="Mouseover Description">Download "File Name" (File Size: XX Kb)</a></li>
.
.
.
<li><a href="file_name.zip" title="Mouseover Description">Download "File Name" (File Size: XXKb)</a></li>
</ul>
</div>
|
|
|
curtranhome
Joined: 04 Jun 2008
Posts: 76
|
| Posted: Sat Nov 15, 2008 9:35 pm |
|
|
| ok thank you :D |
|
|
PayneLess Designs
Joined: 28 Feb 2007
Posts: 4235
Location: MS
|
| Posted: Sat Nov 15, 2008 9:49 pm |
|
|
| You're welcome. Post back here if you have more questions or code doesn't work for you. |
|
|
sasankasb
Joined: 11 Aug 2009
Posts: 2
|
| Posted: Tue Aug 11, 2009 2:50 am |
|
|
This does not work in IE7. It simply open up the file.
How to download the file in IE using the same technique.
Rest of the browsers are working fine.
Thanks
Sasanka |
|
|
PayneLess Designs
Joined: 28 Feb 2007
Posts: 4235
Location: MS
|
| Posted: Wed Aug 12, 2009 9:38 am |
|
|
Are you saying IE7 no longer prompts the user to "open" or "save" the file?
Zip Files Downloaded with Internet Explorer Are Not Saved to Your Computer
Reset Open/Save Choice for Internet Explorer Downloads in Vista |
|
|
sasankasb
Joined: 11 Aug 2009
Posts: 2
|
| Posted: Wed Aug 12, 2009 7:45 pm |
|
|
I am trying to download a xls file in IE 7 (OS - XP SP3)
It simply opens up the file in the browser instead of showing the download dialog.
Browser is showing all junk characters when clicked on the link meant for download. Rest of the browsers are working fine and showing the download dialog.
Even IE 6 is working fine.
Thanks
Sasanka |
|
|
PayneLess Designs
Joined: 28 Feb 2007
Posts: 4235
Location: MS
|
| Posted: Wed Aug 12, 2009 10:26 pm |
|
|
Seems the file extension associated has changed and it is using IE to display file. Read:
Reset Open/Save Choice for Internet Explorer Downloads in Vista
Reset the Always Ask Before Opening This Type of File Setting for XP & Vista
The alternative is find the file on your computer that IE keeps opening, right-click on the file and select "Open With". Browse to the program that you want associated with that file extension. If you want to use the same program all the time, be sure to check the box that states to always open with program selected. |
|
|
Brookswfisher
Joined: 15 Aug 2009
Posts: 1
|
| Posted: Sat Aug 15, 2009 3:09 pm Thanks for the help PayneLess |
|
|
| Thanks so much for the code to trigger downloads on my website PayneLess. It worked great!! |
|
|
PayneLess Designs
Joined: 28 Feb 2007
Posts: 4235
Location: MS
|
| Posted: Sun Aug 16, 2009 6:52 pm |
|
|
| You're very welcome. Always like good news. Made my weekend. |
|
|
DanFinelli
Joined: 13 Feb 2010
Posts: 1
|
| Posted: Sat Feb 13, 2010 8:43 pm |
|
|
| i hope its not too late to ask but i tried what u said for my html and when i try to download it it says error 403 Forbidden meaning i cant access this file any suggestions? |
|
|
PayneLess Designs
Joined: 28 Feb 2007
Posts: 4235
Location: MS
|
| Posted: Sat Feb 13, 2010 10:10 pm |
|
|
| DanFinelli wrote: i hope its not too late to ask but i tried what u said for my html and when i try to download it it says error 403 Forbidden meaning i cant access this file any suggestions? Can you give details? What link did you use and what are you downloading? |
|
|
| |