Web Hosting Vodahost    

Home Take The Royal Tour! Order Now Features Prices
Go Back   Web Hosting > BlueVoda Website Builder Forums > Adding Elements To Your Website

Notices

Adding Elements To Your Website Discussions, help & troubleshooting about adding templates, backgrounds, images, text, iframes, scroll bars, marquees, flash, video, music, HTML Code, shapes, lines, java scripts, and all other elements. Etc… etc…

Reply
 
LinkBack Thread Tools
  #1  
Old 06-19-2008, 02:57 PM
tcampbell's Avatar
Corporal
 
Join Date: Jan 2008
Posts: 13
Question Automatically "Save Target As..."

How can visitors simply click on a download link and have a box pop up automatically for them to rename and save the document to their computer without having to right click on the download link and click "Save Target As..."? I have seen this done on many sites but I don't know how they do it.

I hope someone can help me.

www.TannersSermons.com/sermons.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old 06-20-2008, 09:25 AM
Watdaflip's Avatar
Brigadier General
 
Join Date: Sep 2005
Location: Cincinnati, Ohio
Posts: 1,640
Default Re: Automatically "Save Target As..."

There are multiple ways of doing it. The easiest in my opinion is just adding some lines of code to your .htaccess file in the directory that contains the files you want your users to download

example:
Code:
AddType application/octet-stream .avi
AddType application/octet-stream .mpg
AddType application/octet-stream .wmv
AddType application/octet-stream .mp3
Just change the .avi, .mpg... whatever to the file extension of the files you want to be downloaded. This way when they click the link it will download instead of opening. (meaning they won't have to right click and save)

Hope that helps
__________________

Register/Login Script
Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old 06-20-2008, 08:55 PM
tcampbell's Avatar
Corporal
 
Join Date: Jan 2008
Posts: 13
Question Re: Automatically "Save Target As..."

Thanks for your response. I did everything according to your instructions (at least I think I did): I put the code

AddType application/octet-stream .wma

on the .htaccess file, which changed the pictures of all the wma files in that directory to a blue diamond image (so I guess I did something right), but on the site, the files still just open when I click on the download link, unstead of downloading. What did I do wrong?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old 06-20-2008, 10:46 PM
Watdaflip's Avatar
Brigadier General
 
Join Date: Sep 2005
Location: Cincinnati, Ohio
Posts: 1,640
Default Re: Automatically "Save Target As..."

I don't know how your have your file structure setup, but it may be an issue with the paths to the files in relation to the .htaccess file. Try just adding it to the .htaccess file in your public_html directory. That should effect all other directories globally.

If that doesn't work then there is way to do it with php, but if you have a bunch of files it would either mean creating a php file for each download you have, using an predefined list of files that can be downloaded and use url variables to choose which file, or to use a database to manage the files that will be downloaded.
__________________

Register/Login Script
Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old 06-21-2008, 12:03 AM
tcampbell's Avatar
Corporal
 
Join Date: Jan 2008
Posts: 13
Default Re: Automatically "Save Target As..."

Thanks again for the response, I'll give it a try.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +1. The time now is 07:43 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC7
2007 VodaHost.com - All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55