How do I go to Download dialog?

Discussion in 'HTML' started by Paul Jones, Oct 17, 2006.

  1. Paul Jones

    Paul Jones Guest

    Hi,

    I have a download button on my website where the user can choose to
    download an MP3 file. How do I take the user to the standard "Save As"
    dialog in XP rather than to play the MP3 (which is all I've managed to
    do thus far)? If possible, I'd rather avoid asking the user to
    right-click over the button and choose "Save Target As".

    P.S. I'm not using Coldfusion or Dreamweaver or any other authoring
    utility (for reasons too complex to go into here) but I do have the
    option of javascript or (as a last resort) a Java applet.

    Thanks,
    Paul
    Paul Jones, Oct 17, 2006
    #1
    1. Advertising

  2. Paul Jones wrote:
    > Hi,
    >
    > I have a download button on my website where the user can choose to
    > download an MP3 file. How do I take the user to the standard "Save As"
    > dialog in XP rather than to play the MP3 (which is all I've managed to
    > do thus far)? If possible, I'd rather avoid asking the user to
    > right-click over the button and choose "Save Target As".


    If the user wants to listen to it now, why is it your business to tell
    him to download it and listen to it later? Or vice versa?

    What happens when the user clicks a link to a non-HTML resource depends
    on how his browser is configured. You can't change that.
    Harlan Messinger, Oct 17, 2006
    #2
    1. Advertising

  3. Paul Jones

    Paul Jones Guest

    Harlan Messinger wrote:

    > If the user wants to listen to it now, why is it your business to tell
    > him to download it and listen to it later? Or vice versa?


    I'm giving the user the option of listening to the track(s) on a
    separate button within the same html page. In fact, there are several
    MP3s - it's all rather more complex than I said. What I don't want is
    the user having to exit to a new page to listen to the song and then
    having to reload the page (and lose lose his place) to listen
    to/download other tracks.

    So, is there no way to do what I want - not even with java/javascript?

    Thanks,
    Paul
    Paul Jones, Oct 17, 2006
    #3
  4. Paul Jones

    Ed Mullen Guest

    Paul Jones wrote:
    > Harlan Messinger wrote:
    >
    >> If the user wants to listen to it now, why is it your business to tell
    >> him to download it and listen to it later? Or vice versa?

    >
    > I'm giving the user the option of listening to the track(s) on a
    > separate button within the same html page. In fact, there are several
    > MP3s - it's all rather more complex than I said. What I don't want is
    > the user having to exit to a new page to listen to the song and then
    > having to reload the page (and lose lose his place) to listen
    > to/download other tracks.
    >
    > So, is there no way to do what I want - not even with java/javascript?
    >
    > Thanks,
    > Paul
    >


    If you simply provide a link to the mp3 file, then the user's browser
    configuration will dictate what happens when he left-clicks. It may
    play the file using a browser plug-in with a small pop-up controller.
    It may launch a separate application (in my case, Winamp) to play the
    file. If there is no such functionality defined in the browser setup,
    the user should get a pop-up asking what to do with the file. At that
    point he could play it in a selected external app or download/save it.
    Further, by providing a direct link to the file the user can right-click
    and save the file for later playing in his favorite audio app.

    You could use an embedded approach rather than a simple link. However,
    that is fraught with issues that go back to the differing possible
    system configurations of your users. Likewise, invoking a java player
    applet can't be guaranteed to work for everyone. Some people don't have
    java installed.

    On my site I simply provide direct links to the mp3 files.

    --
    Ed Mullen
    http://edmullen.net
    http://mozilla.edmullen.net
    http://abington.edmullen.net
    Sex: In America an obsession. In other parts of the world a fact. -
    Marlene Dietrich
    Ed Mullen, Oct 17, 2006
    #4
  5. Paul Jones

    Guest

    Paul Jones wrote:
    > I have a download button on my website where the user can choose to
    > download an MP3 file. How do I take the user to the standard "Save As"
    > dialog in XP rather than to play the MP3 (which is all I've managed to
    > do thus far)? If possible, I'd rather avoid asking the user to
    > right-click over the button and choose "Save Target As".


    If you can change the HTTP settings on the server, set the Content-Type
    in the reply header to be "application/octet-stream". Most browsers
    will then give the user the chance of saving it.

    Kev
    , Oct 17, 2006
    #5
  6. wrote:
    > If you can change the HTTP settings on the server, set the Content-Type
    > in the reply header to be "application/octet-stream". Most browsers
    > will then give the user the chance of saving it.


    What do you think your tricky little scheme will do to a browser that
    uses the Content-Type header to determine what type metadata (extension,
    OSTYPE, UTI, on-disk MIME type, whatever) is stored with the file?
    application/octet-stream should only be used when your data is really
    nothing more specific than a stream of octets.
    Leif K-Brooks, Oct 17, 2006
    #6
  7. "Paul Jones" <> wrote in message
    news:...
    > Hi,
    >
    > I have a download button on my website where the user can choose to
    > download an MP3 file. How do I take the user to the standard "Save As"
    > dialog in XP rather than to play the MP3 (which is all I've managed to
    > do thus far)? If possible, I'd rather avoid asking the user to
    > right-click over the button and choose "Save Target As".
    >
    > P.S. I'm not using Coldfusion or Dreamweaver or any other authoring
    > utility (for reasons too complex to go into here) but I do have the
    > option of javascript or (as a last resort) a Java applet.
    >

    pardon my ignorance but what do you mean by a 'download button'? why not
    just have a normal link to the mp3, they left-click it says open or save -
    they choose save (or maybe open, who knows how they feel) job done. isnt it?
    nagasaki mike, Oct 17, 2006
    #7
  8. Paul Jones

    Paul Jones Guest

    nagasaki mike wrote:

    > pardon my ignorance but what do you mean by a 'download button'? why not
    > just have a normal link to the mp3, they left-click it says open or save -
    > they choose save (or maybe open, who knows how they feel) job done. isnt it?


    Well, not really. What we have is a list of 15 tracks each with three
    icons to the left. The first is a listen icon (depicted by a
    semi-quaver) which plays the song in the same html page - I've now got
    this working. The third is a lyrics icon (depicted by a page icon) -
    this was never a problem. The second is a save icon (depicted by a
    floppy disc icon). This seems nigh-on impossible to implement. As a
    result, we've gone for bringing up an alert message when this icon is
    clicked, which tells users words to the effect that they have to
    right-click to save and will probably now be taken somewhere that we
    can't predict and so they will have click the back button on their
    browser to get back to what they were doing.

    I think the one page solution is the ideal way of dealing with our
    requirements and is easier for users to grasp (and keep their place). I
    think it's a significant limitation of browsers that this cannot be
    achieved without getting unacceptably dirty. I'm not alone here -
    google searching shows that there are many people trying to do exactly
    what I've been trying to do - all without success. It's amazing that
    you can generate all sorts of browser events including a left-click and
    a double click, but not a right-click.

    Take care,
    Paul
    Paul Jones, Oct 20, 2006
    #8
  9. Paul Jones wrote:
    > nagasaki mike wrote:
    >
    >> pardon my ignorance but what do you mean by a 'download button'? why not
    >> just have a normal link to the mp3, they left-click it says open or save -
    >> they choose save (or maybe open, who knows how they feel) job done. isnt it?

    >
    > Well, not really. What we have is a list of 15 tracks each with three
    > icons to the left. The first is a listen icon (depicted by a
    > semi-quaver) which plays the song in the same html page - I've now got
    > this working. The third is a lyrics icon (depicted by a page icon) -
    > this was never a problem. The second is a save icon (depicted by a
    > floppy disc icon). This seems nigh-on impossible to implement. As a
    > result, we've gone for bringing up an alert message when this icon is
    > clicked, which tells users words to the effect that they have to
    > right-click to save and will probably now be taken somewhere that we
    > can't predict and so they will have click the back button on their
    > browser to get back to what they were doing.


    I think you're looking at this from the wrong perspective. From *your*
    perspective, there's a perplexing number of possible ways the download
    might work on the user's end. From the user's perspective, it works the
    same way every time on his computer, and he already *knows* what that
    is. Just let him do what he's already used to doing, whatever that is,
    instead of trying to make it work *one* way, *your* way, which may not
    be that the user is familiar with at all.
    Harlan Messinger, Oct 20, 2006
    #9
  10. Paul Jones

    Guest

    As far as I know, there isn't a way to invoke the Save As dialog box
    via JavaScript or by using other client side browser techniques. If you
    really want to do this, it's easiest done server side via a script of
    some sort.

    But as mentioned previously, consider your end user... People have a
    certain expectation of what will happen when left clicking on links,
    regardless of what lives behind those links. Instead of trying to
    reinvent the wheel so to speak, would it be possible to reinvent your
    page and the MP3 links? A simple "Left click the file to open, Right
    click the file to save" would make your life lots easier and your
    visitor's as well.

    -Travis


    On Oct 17, 4:48 am, "Paul Jones" <> wrote:
    > Hi,
    >
    > I have a download button on my website where the user can choose to
    > download an MP3 file. How do I take the user to the standard "Save As"
    > dialog in XP rather than to play the MP3 (which is all I've managed to
    > do thus far)? If possible, I'd rather avoid asking the user to
    > right-click over the button and choose "Save Target As".
    >
    > P.S. I'm not using Coldfusion or Dreamweaver or any other authoring
    > utility (for reasons too complex to go into here) but I do have the
    > option of javascript or (as a last resort) a Java applet.
    >
    > Thanks,
    > Paul
    , Oct 20, 2006
    #10
  11. Paul Jones

    Paul Jones Guest

    Harlan Messinger wrote:

    > I think you're looking at this from the wrong perspective. From *your*
    > perspective, there's a perplexing number of possible ways the download
    > might work on the user's end. From the user's perspective, it works the
    > same way every time on his computer, and he already *knows* what that
    > is. Just let him do what he's already used to doing, whatever that is,
    > instead of trying to make it work *one* way, *your* way, which may not
    > be that the user is familiar with at all.


    I disagree and so do the band. I wasn't asking how to design the app,
    just how to invoke a simulated right-click. Furthermore, I don't
    believe that the current, clunky, feel that you're describing is how
    things will end up given time. Computer usage changes by the month.
    ITunes doesn't work the way you describe for the very good reason is
    that it's clunky. We're not going to agree here and, fortunately, you
    have no input into the design.

    Paul
    Paul Jones, Oct 21, 2006
    #11
  12. Paul Jones

    Paul Jones Guest

    wrote:
    > As far as I know, there isn't a way to invoke the Save As dialog box
    > via JavaScript or by using other client side browser techniques. If you
    > really want to do this, it's easiest done server side via a script of
    > some sort.


    I accept this.

    > But as mentioned previously, consider your end user... People have a
    > certain expectation of what will happen when left clicking on links,
    > regardless of what lives behind those links. Instead of trying to
    > reinvent the wheel so to speak, would it be possible to reinvent your
    > page and the MP3 links? A simple "Left click the file to open, Right
    > click the file to save" would make your life lots easier and your
    > visitor's as well.


    Just because this is the way everybody has to do this because of
    browser limitations doesn't mean that it's the best way. Out of
    interest, nobody in the band had any problem using the page the way
    I've designed it. Two clicks, invoking previous knowledge, has to be
    worse that one click that requires no knowledge of browser limitations.

    Paul
    Paul Jones, Oct 21, 2006
    #12
  13. Paul Jones

    password Guest

    "Paul Jones" <> wrote in message
    news:...
    > wrote:
    > > As far as I know, there isn't a way to invoke the Save As dialog box
    > > via JavaScript or by using other client side browser techniques. If you
    > > really want to do this, it's easiest done server side via a script of
    > > some sort.

    >
    > I accept this.
    >
    > > But as mentioned previously, consider your end user... People have a
    > > certain expectation of what will happen when left clicking on links,
    > > regardless of what lives behind those links. Instead of trying to
    > > reinvent the wheel so to speak, would it be possible to reinvent your
    > > page and the MP3 links? A simple "Left click the file to open, Right
    > > click the file to save" would make your life lots easier and your
    > > visitor's as well.

    >
    > Just because this is the way everybody has to do this because of
    > browser limitations doesn't mean that it's the best way. Out of
    > interest, nobody in the band had any problem using the page the way
    > I've designed it. Two clicks, invoking previous knowledge, has to be
    > worse that one click that requires no knowledge of browser limitations.
    >

    and you are unaware of all the bother you are going through in order to get
    this to happen?
    the band and you may well have had no problem, maybe they have seen the
    site, maybe you have explained things to them, but what about a stranger
    just passing through? methinks you need some hci testing pronto.
    password, Oct 21, 2006
    #13
  14. Paul Jones

    Guest

    Paul Jones wrote:
    > Just because this is the way everybody has to do this because of
    > browser limitations doesn't mean that it's the best way. Out of
    > interest, nobody in the band had any problem using the page the way
    > I've designed it. Two clicks, invoking previous knowledge, has to be
    > worse that one click that requires no knowledge of browser limitations.


    I agree, simply because most people like my wife and father have no
    clue about right-click to Save methods. The easier you can make it for
    people like them, the better. The ones who already know how to
    download are not a worry.

    I agree with others, though, that clear instructions also make a world
    of difference.

    Cheers, Kev
    , Oct 21, 2006
    #14
  15. Paul Jones wrote:
    > We're not going to agree here and, fortunately, you have no input
    > into the design.


    You post to Usenet, then _after_ getting useful replies, tell us that
    you don't really care what we have to say?

    Welcome to the killfile.
    Leif K-Brooks, Oct 21, 2006
    #15
  16. Leif K-Brooks <> wrote:

    > Paul Jones wrote:
    > > We're not going to agree here and, fortunately, you have no input
    > > into the design.

    >
    > You post to Usenet, then _after_ getting useful replies, tell us that
    > you don't really care what we have to say?


    Usenet: You post, we discuss. The observant reader will note that the
    original poster is under no obligation whatsoever to be grateful for or
    even respectful of opinions or asserted facts during the discussion.

    Kind of makes sense, given that others are under no obligation to
    respond directly to the OP's inquiry. Why is that quid quo pro so
    troublesome to you?

    > Welcome to the killfile.


    Is it that extending a courtesy, or just a power thing? Why not just do
    it without announcing it to the world?

    --
    Joel.
    Joel Shepherd, Oct 21, 2006
    #16
  17. Paul Jones

    Paul Jones Guest

    Joel Shepherd wrote:
    > Leif K-Brooks <> wrote:
    >
    > > Paul Jones wrote:
    > > > We're not going to agree here and, fortunately, you have no input
    > > > into the design.

    > >
    > > You post to Usenet, then _after_ getting useful replies, tell us that
    > > you don't really care what we have to say?

    >
    > Usenet: You post, we discuss. The observant reader will note that the
    > original poster is under no obligation whatsoever to be grateful for or
    > even respectful of opinions or asserted facts during the discussion.


    I am grateful for being told that it's impossible to go straight to the
    download dialog. Thanks.

    Paul
    Paul Jones, Oct 21, 2006
    #17
  18. Paul Jones wrote:
    > Joel Shepherd wrote:
    >> Leif K-Brooks <> wrote:
    >>
    >>> Paul Jones wrote:
    >>>> We're not going to agree here and, fortunately, you have no input
    >>>> into the design.
    >>> You post to Usenet, then _after_ getting useful replies, tell us that
    >>> you don't really care what we have to say?

    >> Usenet: You post, we discuss. The observant reader will note that the
    >> original poster is under no obligation whatsoever to be grateful for or
    >> even respectful of opinions or asserted facts during the discussion.

    >
    > I am grateful for being told that it's impossible to go straight to the
    > download dialog. Thanks.


    If I have my browser set to handle a certain media type in a
    particularly way the last thing I want is a webpage changing that
    default without my permission! Your situation is an MP3 but consider an
    executable application/x-msdownload. I have it set (and you should too)
    to download ONLY, could you see the potential problem if a webpage could
    force a change in the default handling of that file type? That is why
    the restriction and why there should be a clear distinction between
    local and remote file systems regardless of what big Bill G. thinks...

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Oct 21, 2006
    #18
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    0
    Views:
    536
    Guest
    Jul 28, 2004
  2. Ken Cox [Microsoft MVP]

    Re: aspx and IE download dialog

    Ken Cox [Microsoft MVP], Aug 22, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    326
    Jerry III
    Aug 22, 2003
  3. timtos
    Replies:
    2
    Views:
    475
    timtos
    Oct 17, 2003
  4. yw
    Replies:
    3
    Views:
    806
    Phlip
    Jul 2, 2005
  5. Matt
    Replies:
    1
    Views:
    269
    Randy Webb
    Nov 20, 2004
Loading...

Share This Page