saving files to a pc

Discussion in 'HTML' started by Steve West, Aug 19, 2005.

  1. Steve West

    Steve West Guest

    How do you save files to a pc using html? I know how to browse and get
    files, but do not know how to save them.


    Steve
     
    Steve West, Aug 19, 2005
    #1
    1. Advertising

  2. Steve West wrote:

    > How do you save files to a pc using html?


    You don't. You provide a link to the file and let the user's preferences
    decide how that file will be handled.


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

  3. Steve West wrote:
    > How do you save files to a pc using html? I know how to browse and get
    > files, but do not know how to save them.


    Er... you click File -> Save As?
     
    Mitja Trampus, Aug 19, 2005
    #3
  4. Steve West

    Steve West Guest

    "David Dorward" <> wrote in message
    news:de55tm$ll8$1$...
    > Steve West wrote:
    >
    >> How do you save files to a pc using html?

    >
    > You don't. You provide a link to the file and let the user's preferences
    > decide how that file will be handled.
    >

    How do you get the file download box to come up? And how does the pc ask for
    and receive the file?

    Steve
     
    Steve West, Aug 19, 2005
    #4
  5. Steve West

    Dylan Parry Guest

    Using a pointed stick and pebbles, Steve West scraped:

    > How do you get the file download box to come up? And how does the pc ask for
    > and receive the file?


    1. You make a link (<a href="myfile.ext">download my file</a>)
    2. User clicks link
    3. Save dialogue pops up, or file opens in browser

    --
    Dylan Parry
    http://webpageworkshop.co.uk -- FREE Web tutorials and references
     
    Dylan Parry, Aug 19, 2005
    #5
  6. Steve West wrote:
    > "David Dorward" <> wrote in message
    > news:de55tm$ll8$1$...
    >
    >>Steve West wrote:
    >>
    >>
    >>>How do you save files to a pc using html?

    >>
    >>You don't. You provide a link to the file and let the user's preferences
    >>decide how that file will be handled.
    >>

    >
    > How do you get the file download box to come up? And how does the pc ask for
    > and receive the file?
    >
    > Steve
    >
    >


    google mime filtypes - the server sends the file type; it's up to the PC
    to decide what to do with it - i.e. play it if it is a video file,
    display it if it is a jpeg, blah, blah, blah. You as the server have no
    idea what the client's capabilities are; all you can do is send the file...

    Here's what I use to allow a user to print/send/save an image off my server:

    <FORM>
    <INPUT class="button" NAME="print" TYPE="button" VALUE="Print"
    ONCLICK="varitext()">
    <input class="button" type=button value="Save"
    onclick="JavaScript:document.location.href='http://URLofFileToSave'">
    <input class="button" type=button value="Email"
    onclick="JavaScript:document.location.href='http://URLofEmailForm'">

    <input class="button" type=button value="Close"
    onclick="self.close()">
    </FORM>
     
    Captain Dondo, Aug 19, 2005
    #6
  7. In article <>,
    says...
    > Steve West wrote:
    > > "David Dorward" <> wrote in message
    > > news:de55tm$ll8$1$...
    > >
    > >>Steve West wrote:
    > >>
    > >>
    > >>>How do you save files to a pc using html?
    > >>
    > >>You don't. You provide a link to the file and let the user's preferences
    > >>decide how that file will be handled.
    > >>

    > >
    > > How do you get the file download box to come up? And how does the pc ask for
    > > and receive the file?
    > >
    > > Steve
    > >
    > >

    >
    > google mime filtypes - the server sends the file type; it's up to the PC
    > to decide what to do with it - i.e. play it if it is a video file,
    > display it if it is a jpeg, blah, blah, blah. You as the server have no
    > idea what the client's capabilities are; all you can do is send the file...
    >
    > Here's what I use to allow a user to print/send/save an image off my server:
    >
    > <FORM>
    > <INPUT class="button" NAME="print" TYPE="button" VALUE="Print"
    > ONCLICK="varitext()">
    > <input class="button" type=button value="Save"
    > onclick="JavaScript:document.location.href='http://URLofFileToSave'">
    > <input class="button" type=button value="Email"
    > onclick="JavaScript:document.location.href='http://URLofEmailForm'">
    >
    > <input class="button" type=button value="Close"
    > onclick="self.close()">
    > </FORM>


    Have you got a URL that shows that in action? I fail to see how
    specifying location.href to a JPEG will cause the "Save As" dialog.

    --
    Hywel
    http://kibo.org.uk/
     
    Hywel Jenkins, Aug 23, 2005
    #7
  8. Hywel Jenkins wrote:
    > In article <>,
    > says...
    >
    >>Steve West wrote:
    >>
    >>>"David Dorward" <> wrote in message
    >>>news:de55tm$ll8$1$...
    >>>
    >>>
    >>>>Steve West wrote:
    >>>>
    >>>>
    >>>>
    >>>>>How do you save files to a pc using html?
    >>>>
    >>>>You don't. You provide a link to the file and let the user's preferences
    >>>>decide how that file will be handled.
    >>>>
    >>>
    >>>How do you get the file download box to come up? And how does the pc ask for
    >>>and receive the file?
    >>>
    >>>Steve
    >>>
    >>>

    >>
    >>google mime filtypes - the server sends the file type; it's up to the PC
    >>to decide what to do with it - i.e. play it if it is a video file,
    >>display it if it is a jpeg, blah, blah, blah. You as the server have no
    >>idea what the client's capabilities are; all you can do is send the file...
    >>
    >>Here's what I use to allow a user to print/send/save an image off my server:
    >>
    >><FORM>
    >><INPUT class="button" NAME="print" TYPE="button" VALUE="Print"
    >>ONCLICK="varitext()">
    >><input class="button" type=button value="Save"
    >>onclick="JavaScript:document.location.href='http://URLofFileToSave'">
    >><input class="button" type=button value="Email"
    >>onclick="JavaScript:document.location.href='http://URLofEmailForm'">
    >>
    >><input class="button" type=button value="Close"
    >>onclick="self.close()">
    >></FORM>

    >
    >
    > Have you got a URL that shows that in action? I fail to see how
    > specifying location.href to a JPEG will cause the "Save As" dialog.
    >


    Well, yes.... It won't. It calls a php routine which then prods the
    browser to do something....

    http://www.seiner.com ; click on any of the recent pics and you will get
    a popup with mail/save/print options....
     
    Captain Dondo, Aug 23, 2005
    #8
  9. Steve West

    Steve West Guest

    ">
    > Well, yes.... It won't. It calls a php routine which then prods the
    > browser to do something....
    >


    What does the php routine do to cause the browser to prompt for saving the
    file? I am writing all the server and php code to handle these matters.

    Steve
     
    Steve West, Aug 24, 2005
    #9
  10. Steve West wrote:

    > ">
    >> Well, yes.... It won't. It calls a php routine which then prods the
    >> browser to do something....
    >>

    >
    > What does the php routine do to cause the browser to prompt for saving the
    > file? I am writing all the server and php code to handle these matters.
    >
    > Steve


    Search für 'Content-Disposition' - can't write more now, my daugther is
    calling ;)

    --
    Benjamin Niemann
    Email: pink at odahoda dot de
    WWW: http://www.odahoda.de/
     
    Benjamin Niemann, Aug 24, 2005
    #10
  11. Benjamin Niemann wrote:

    > Steve West wrote:
    >
    >> ">
    >>> Well, yes.... It won't. It calls a php routine which then prods the
    >>> browser to do something....
    >>>

    >>
    >> What does the php routine do to cause the browser to prompt for saving
    >> the file? I am writing all the server and php code to handle these
    >> matters.
    >>
    >> Steve

    >
    > Search für 'Content-Disposition' - can't write more now, my daugther is
    > calling ;)
    >


    ok, here's a short update: look at the last example in
    <http://www.php.net/header>.

    --
    Benjamin Niemann
    Email: pink at odahoda dot de
    WWW: http://www.odahoda.de/
     
    Benjamin Niemann, Aug 24, 2005
    #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. PuZzLeD

    Saving files in Perl

    PuZzLeD, May 18, 2004, in forum: Perl
    Replies:
    1
    Views:
    516
    Joe Smith
    May 18, 2004
  2. Joel Zinn

    Problem saving files.

    Joel Zinn, Jul 19, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    385
    Rick Strahl [MVP]
    Jul 19, 2004
  3. John Kandell
    Replies:
    4
    Views:
    4,233
    eeebop
    Dec 10, 2004
  4. Luis Esteban Valencia
    Replies:
    0
    Views:
    2,556
    Luis Esteban Valencia
    Jan 6, 2005
  5. Lovely Angel For You

    Saving Images While Saving ASP Pages !

    Lovely Angel For You, Oct 2, 2003, in forum: ASP General
    Replies:
    1
    Views:
    232
    Curt_C [MVP]
    Oct 3, 2003
Loading...

Share This Page