Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15
  1. #1
    Junior Member
    Join Date
    Jun 2005
    Location
    London
    Posts
    6
    Member #
    10434
    Hi,

    I have just created my first website but having a problem...please help!!!!
    i have on my website mp3 files created by myself and there
    for people to download, as it stands at the moment is you right click on the link and select 'Save Target As' but what i want is to have a single click button that brings up the 'Save file' dialog box as i have also created a button to play the file within the default mp3 player on the browsers pc.
    I'm using Dreamweaver MX Version 6.
    How do i create a single click download button or link?
    Thanks
    e-x-p

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Generally speaking, browsers will download anything that they don't know how to handle internally. I don't *think* there's a way to pop up the save as dialog box; the only way would be to make sure that the MIME type is something the browser doesn't know about (application/unknown or something would probably do the trick), so that it will automatically pop it up.

    Unfortunately, I'm also not sure how to do that. It would probably involve .htaccess files, however.

  4. #3
    Junior Member
    Join Date
    Jun 2005
    Location
    London
    Posts
    6
    Member #
    10434
    Thanks very much Shadowfiend,

    not sure that i want to go down that path though
    i'd have to advise people what to do with the file (renaming back
    to mp3) just want to make it easier for people to download
    rather than explaining 'click here to listen' to download 'right click and save target as' etc just want a simple button to listen and another for download.
    at the moment if i click the link it opens the page to play in quicktime within the browser...if that makes sense
    but thanks once again
    e-x-p

  5. #4
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Well, the point of changing the MIME type is to do it without changing the file extension. Then, once it gets to the computer, since the extension is the same, they'd be able to use it just the same. That's why I said you'd probably have to use the .htaccess file. But it's something I don't know how to do anyway, so I don't blame you for not wanting to try it :-).

  6. #5
    Junior Member
    Join Date
    Jun 2005
    Location
    London
    Posts
    6
    Member #
    10434
    yeah i know nothing about MIME to be honest let alone .htaccess files...lol i'm a complete begginer at web design...thanks anyway though
    e-x-p

  7. #6
    Junior Member
    Join Date
    Jun 2005
    Posts
    28
    Member #
    10295
    Im also having the same problems, you'd click a file and it will download it (but ie wont tell you) then play it internally!

    Tonight when I get in i shall play around with it more...

  8. #7
    Junior Member
    Join Date
    Jun 2005
    Location
    London
    Posts
    6
    Member #
    10434
    Hi Silent Bob
    would be much appreciated if you find a solution and let us know
    does yours play within the IE browser with quicktime?
    regards
    e-x-p

    if anyone wants to check my website out by the way to see what i mean then go to www.e-x-p.co.uk and check out the Music section.

  9. #8
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Ok, a quick Google tells me this might do the trick:

    Create a .htaccess file in the directory where you have your mp3 files, and add the following line to it:

    Code:
    AddType application/octet-stream .mp3
    If that doesn't work, try application/unknown or just unknown.

    According to your response headers, you're using Apache, so that should work. There is a possibility that your webhost has disabled htaccess files, however. In that case, you should probably contact them to see if you can reenable it.

  10. #9
    Junior Member
    Join Date
    Jun 2005
    Location
    London
    Posts
    6
    Member #
    10434
    Hi,

    Thanks so much, am really sorry if i seem dumb here, like i said i'm a newbie to this kind of stuff,
    how do i add a .htaccess file? is it a txt doc with that exact string in it or do i have to rename parts of that string to my file names?
    I tried google -ing it but really don't understand...lol

    e-x-p

    thanks

  11. #10
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    It's essentially a text file, yes, except instead of naming it `filename.txt', you name it `.htaccess'.


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:30 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com