What html element can I use for "download/save file as" box?

Discussion in 'HTML' started by thisis, Oct 26, 2006.

  1. thisis

    thisis Guest

    Hi All,

    I have an asp/html page that opens a "download/save file as" box,
    - e.g. like the element for uploading files <input type="file" .../>


    My Question is:

    What html element can I use for "download/save file as" box,
    Or what alternatives do I have for displaying this operation -
    download/save file as" ?
     
    thisis, Oct 26, 2006
    #1
    1. Advertising

  2. thisis wrote:

    > What html element can I use for "download/save file as" box,


    <a href="foo"> ... </a>

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Oct 26, 2006
    #2
    1. Advertising

  3. thisis

    Andy Dingley Guest

    thisis wrote:

    > I have an asp/html page that opens a "download/save file as" box,


    It doesn't. What it does is it offers a link to some content (with <a
    href="foo" > ) and _that_content_ causes the "save as" dialog to
    appear, for some population of users. In particular the HTTP
    content-type header that's supplied with this content will trigger it.

    You can't control this triggering. It's usually not a response _to_
    something definite, but a response when that thing isn't recognised.
    Some browsers will now display XML, some (older) browsers won't
    recognise it and so they fall back to a default of offering to save it
    for you. Much depends on the particular config of particular browsers
    for particular users. HTML is always going to be displayed. ZIP files
    will be saved. XML could go either way, and you can't predict this.

    You can _suggest_ the display / save switch. A well-admined server will
    already do this, or you can control it yourself through ASP. They
    recognise the file extension and select an apropriate content-type
    automatically. Sending "recognised and displayable" content-types
    causes display, Sending "known but undisplayable" types causes a save,
    as does "unknown" -- in most cases. Remember that this is the
    _browser's_ list, and you don't know it exactly.

    If you want to "recommend" saving rather than display, then send a
    content-type that's likely to do this for most browsers. As you don't
    say what your content is, then it's hard to recommend one (although
    application/octet-stream might do the trick).

    For a simple "quick hack", then just zip the file up and link to the
    zipfile.
     
    Andy Dingley, Oct 26, 2006
    #3
  4. thisis

    thisis Guest

    Andy Dingley wrote:
    > thisis wrote:
    >
    > > I have an asp/html page that opens a "download/save file as" box,

    >
    > It doesn't. What it does is it offers a link to some content (with <a
    > href="foo" > ) and _that_content_ causes the "save as" dialog to
    > appear, for some population of users. In particular the HTTP
    > content-type header that's supplied with this content will trigger it.
    >
    > You can't control this triggering. It's usually not a response _to_
    > something definite, but a response when that thing isn't recognised.
    > Some browsers will now display XML, some (older) browsers won't
    > recognise it and so they fall back to a default of offering to save it
    > for you. Much depends on the particular config of particular browsers
    > for particular users. HTML is always going to be displayed. ZIP files
    > will be saved. XML could go either way, and you can't predict this.
    >
    > You can _suggest_ the display / save switch. A well-admined server will
    > already do this, or you can control it yourself through ASP. They
    > recognise the file extension and select an apropriate content-type
    > automatically. Sending "recognised and displayable" content-types
    > causes display, Sending "known but undisplayable" types causes a save,
    > as does "unknown" -- in most cases. Remember that this is the
    > _browser's_ list, and you don't know it exactly.
    >
    > If you want to "recommend" saving rather than display, then send a
    > content-type that's likely to do this for most browsers. As you don't
    > say what your content is, then it's hard to recommend one (although
    > application/octet-stream might do the trick).
    >
    > For a simple "quick hack", then just zip the file up and link to the
    > zipfile.


    Hi Andy Dingley,

    Thanks for the detailed guidelines.

    my content type are image file types: .bmp,.jpeg,.jpg,.gif - animated
    too, partially .wmf

    i use ms-internet explorer 6.0, on some web sites. when an image file
    is displayed on it,
    sometimes a "4 options small bar" - save file, print file, email file,
    open my doc's folder - is displayed on the upper left side. sometimes,
    a resize image thumb is displayed on the image. the reason is for
    posting this topic is, because not all clients use ie,
    so i want to have a more clear controled switch on my web page.

    Maybe you have a sample code page for your example?
     
    thisis, Oct 28, 2006
    #4
  5. thisis

    John Dunlop Guest

    Andy Dingley:

    [...]

    > If you want to "recommend" saving rather than display, then send a
    > content-type that's likely to do this for most browsers. As you don't
    > say what your content is, then it's hard to recommend one (although
    > application/octet-stream might do the trick).


    RFC2616 : 19.5.1 says:

    | If [Content-Disposition] is used in a response with the
    | application/octet-stream content-type, the implied
    | suggestion is that the user agent should not display
    | the response, but directly enter a `save response
    | as...' dialog.

    http://www.ietf.org/rfc/rfc2616.txt

    Not only do I find this paragraph odd and wholly unnecessary, coming
    from (an appendix of) the HTTP spec, but I also regard
    Content-Disposition (spit!) on the WWW as pernicious. Don't get me
    wrong, I think Content-Disposition has its place - mail rather than the
    WWW.

    --
    Jock
     
    John Dunlop, Oct 28, 2006
    #5
  6. thisis

    Dan Guest

    thisis wrote:
    > i use ms-internet explorer 6.0,


    What *you* use shouldn't be particularly relevant to your design of a
    Web site, since it is going to be viewed in the browsers your users
    use. If you follow the standards properly, you have the best chance of
    the site being usable to a broad range of users with a broad range of
    browsers and settings.

    --
    Dan
     
    Dan, Oct 28, 2006
    #6
  7. thisis

    thisis Guest

    Dan wrote:
    > thisis wrote:
    > > i use ms-internet explorer 6.0,

    >
    > What *you* use shouldn't be particularly relevant to your design of a
    > Web site, since it is going to be viewed in the browsers your users
    > use. If you follow the standards properly, you have the best chance of
    > the site being usable to a broad range of users with a broad range of
    > browsers and settings.
    >
    > --
    > Dan


    Hi Dan,

    what standars do you mean? - can you supply a link?
     
    thisis, Oct 28, 2006
    #7
  8. thisis

    Ed Mullen Guest

    thisis wrote:
    > Dan wrote:
    >> thisis wrote:
    >>> i use ms-internet explorer 6.0,

    >> What *you* use shouldn't be particularly relevant to your design of a
    >> Web site, since it is going to be viewed in the browsers your users
    >> use. If you follow the standards properly, you have the best chance of
    >> the site being usable to a broad range of users with a broad range of
    >> browsers and settings.
    >>
    >> --
    >> Dan

    >
    > Hi Dan,
    >
    > what standars do you mean? - can you supply a link?
    >


    I'd start with
    http://www.w3.org/
    http://www.w3.org/Consortium/activities
    http://www.w3.org/TR/

    --
    Ed Mullen
    http://edmullen.net
    http://mozilla.edmullen.net
    http://abington.edmullen.net
    Seen it all, done it all, can't remember most of it.
     
    Ed Mullen, Oct 29, 2006
    #8
  9. thisis

    thisis Guest

    Ed Mullen wrote:
    > thisis wrote:
    > > Dan wrote:
    > >> thisis wrote:
    > >>> i use ms-internet explorer 6.0,
    > >> What *you* use shouldn't be particularly relevant to your design of a
    > >> Web site, since it is going to be viewed in the browsers your users
    > >> use. If you follow the standards properly, you have the best chance of
    > >> the site being usable to a broad range of users with a broad range of
    > >> browsers and settings.
    > >>
    > >> --
    > >> Dan

    > >
    > > Hi Dan,
    > >
    > > what standars do you mean? - can you supply a link?
    > >

    >
    > I'd start with
    > http://www.w3.org/
    > http://www.w3.org/Consortium/activities
    > http://www.w3.org/TR/
    >
    > --
    > Ed Mullen
    > http://edmullen.net
    > http://mozilla.edmullen.net
    > http://abington.edmullen.net
    > Seen it all, done it all, can't remember most of it.


    Hi Ed Mullen,

    i farmilliar with w3 site, each time i read their recomdies, i can't my
    head nor my feet,
    it's so complex tearms.

    thanks for the other links, i haven't scan them yet.
     
    thisis, Oct 29, 2006
    #9
  10. thisis

    Ed Mullen Guest

    thisis wrote:
    > Ed Mullen wrote:
    >> thisis wrote:
    >>> Dan wrote:
    >>>> thisis wrote:
    >>>>> i use ms-internet explorer 6.0,
    >>>> What *you* use shouldn't be particularly relevant to your design of a
    >>>> Web site, since it is going to be viewed in the browsers your users
    >>>> use. If you follow the standards properly, you have the best chance of
    >>>> the site being usable to a broad range of users with a broad range of
    >>>> browsers and settings.
    >>>>
    >>>> --
    >>>> Dan
    >>> Hi Dan,
    >>>
    >>> what standars do you mean? - can you supply a link?
    >>>

    >> I'd start with
    >> http://www.w3.org/
    >> http://www.w3.org/Consortium/activities
    >> http://www.w3.org/TR/
    >>
    >> --
    >> Ed Mullen
    >> http://edmullen.net
    >> http://mozilla.edmullen.net
    >> http://abington.edmullen.net
    >> Seen it all, done it all, can't remember most of it.

    >
    > Hi Ed Mullen,
    >
    > i farmilliar with w3 site, each time i read their recomdies, i can't my
    > head nor my feet,
    > it's so complex tearms.
    >
    > thanks for the other links, i haven't scan them yet.
    >

    But, that does not belie the fact that you need to understand the
    concept of standards which you have indicated that you don't understand.
    If you make a page for IE, or only evaluate in IE, then you tell us
    that you don't "get" standards, which were created to resolve the exact
    problem you claim to have.

    So. Code/write first for compatibility. All else will follow.


    --
    Ed Mullen
    http://edmullen.net
    http://mozilla.edmullen.net
    http://abington.edmullen.net
    Better living through denial.
     
    Ed Mullen, Oct 30, 2006
    #10
  11. thisis

    thisis Guest

    Ed Mullen wrote:
    > thisis wrote:
    > > Ed Mullen wrote:
    > >> thisis wrote:
    > >>> Dan wrote:
    > >>>> thisis wrote:
    > >>>>> i use ms-internet explorer 6.0,
    > >>>> What *you* use shouldn't be particularly relevant to your design of a
    > >>>> Web site, since it is going to be viewed in the browsers your users
    > >>>> use. If you follow the standards properly, you have the best chance of
    > >>>> the site being usable to a broad range of users with a broad range of
    > >>>> browsers and settings.
    > >>>>
    > >>>> --
    > >>>> Dan
    > >>> Hi Dan,
    > >>>
    > >>> what standars do you mean? - can you supply a link?
    > >>>
    > >> I'd start with
    > >> http://www.w3.org/
    > >> http://www.w3.org/Consortium/activities
    > >> http://www.w3.org/TR/
    > >>
    > >> --
    > >> Ed Mullen
    > >> http://edmullen.net
    > >> http://mozilla.edmullen.net
    > >> http://abington.edmullen.net
    > >> Seen it all, done it all, can't remember most of it.

    > >
    > > Hi Ed Mullen,
    > >
    > > i farmilliar with w3 site, each time i read their recomdies, i can't my
    > > head nor my feet,
    > > it's so complex tearms.
    > >
    > > thanks for the other links, i haven't scan them yet.
    > >

    > But, that does not belie the fact that you need to understand the
    > concept of standards which you have indicated that you don't understand.
    > If you make a page for IE, or only evaluate in IE, then you tell us
    > that you don't "get" standards, which were created to resolve the exact
    > problem you claim to have.
    >
    > So. Code/write first for compatibility. All else will follow.
    >
    >
    > --
    > Ed Mullen
    > http://edmullen.net
    > http://mozilla.edmullen.net
    > http://abington.edmullen.net
    > Better living through denial.


    Hi Ed,

    thanks for the links!
     
    thisis, Oct 30, 2006
    #11
    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. SirPoonga
    Replies:
    2
    Views:
    804
    Ben Strackany
    Jan 7, 2005
  2. ashutosh
    Replies:
    3
    Views:
    9,034
    Andrew Thompson
    Jun 16, 2005
  3. Gnarlodious
    Replies:
    4
    Views:
    17,679
    elizas
    May 5, 2010
  4. HANM
    Replies:
    2
    Views:
    751
    Joseph Kesselman
    Jan 29, 2008
  5. vinayak
    Replies:
    5
    Views:
    312
    Thomas 'PointedEars' Lahn
    Jan 18, 2008
Loading...

Share This Page