Way to save form data locally w/o server?

Discussion in 'HTML' started by greg_e@mail.com, Aug 18, 2007.

  1. Guest

    Is there a way to create a form in a local html file where the
    contents of the form are written to a local file when a 'save' button
    is selected?

    It would be nice if it was as easy as changing "somesite.com" to
    "file:///C:/whatever" and "post" to "save"... in the following form:
    <form action = "somesite.com" method="post">
    <p> <textarea name="Text" rows="20" cols="80"> </textarea>
    <input value="Send" type="submit"><input type="reset"> </p>
    </form>

    I would like to do this without using javascript, and without having
    to set up a local server to serve the form.

    Any help appreciated.
     
    , Aug 18, 2007
    #1
    1. Advertising

  2. mbstevens Guest

    wrote:
    > Is there a way to create a form in a local html file where the
    > contents of the form are written to a local file when a 'save' button
    > is selected?
    >
    > It would be nice if it was as easy as changing "somesite.com" to
    > "file:///C:/whatever" and "post" to "save"... in the following form:
    > <form action = "somesite.com" method="post">
    > <p> <textarea name="Text" rows="20" cols="80"> </textarea>
    > <input value="Send" type="submit"><input type="reset"> </p>
    > </form>
    >
    > I would like to do this without using javascript, and without having
    > to set up a local server to serve the form.
    >
    > Any help appreciated.
    >

    It is not really that hard to set up a local server with CGI or LAMP, if
    you feel you really *must* use a local html file.

    On the other hand, Python comes with Tk and has hooks to other
    easy to use GUI packages, which might make more sense to use locally.
    Perl and Ruby have similar hooks. Is there anything really magic
    about an html file for your uses?
     
    mbstevens, Aug 18, 2007
    #2
    1. Advertising

  3. wrote:
    > Is there a way to create a form in a local html file where the
    > contents of the form are written to a local file when a 'save' button
    > is selected?
    >
    > It would be nice if it was as easy as changing "somesite.com" to
    > "file:///C:/whatever" and "post" to "save"... in the following form:
    > <form action = "somesite.com" method="post">
    > <p> <textarea name="Text" rows="20" cols="80"> </textarea>
    > <input value="Send" type="submit"><input type="reset"> </p>
    > </form>
    >
    > I would like to do this without using javascript, and without having
    > to set up a local server to serve the form.
    >
    > Any help appreciated.
    >


    No. This is a job for local scripting. Use a batch file.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Aug 18, 2007
    #3
  4. Guest

    On Aug 17, 7:44 pm, mbstevens <> wrote:
    > wrote:
    > > Is there a way to create a form in a local html file where the
    > > contents of the form are written to a local file when a 'save' button
    > > is selected?

    >
    > > It would be nice if it was as easy as changing "somesite.com" to
    > > "file:///C:/whatever" and "post" to "save"... in the following form:
    > > <form action = "somesite.com" method="post">
    > > <p> <textarea name="Text" rows="20" cols="80"> </textarea>
    > > <input value="Send" type="submit"><input type="reset"> </p>
    > > </form>

    >
    > > I would like to do this without using javascript, and without having
    > > to set up a local server to serve the form.

    >
    > > Any help appreciated.

    >
    > It is not really that hard to set up a local server with CGI or LAMP, if
    > you feel you really *must* use a local html file.
    >
    > On the other hand, Python comes with Tk and has hooks to other
    > easy to use GUI packages, which might make more sense to use locally.
    > Perl and Ruby have similar hooks. Is there anything really magic
    > about an html file for your uses?


    I basically just need a local page I can load in Firefox that will
    make Firefox act like notepad, where you can save a text area to a
    file, but I don't even need to be able to select the filename, like
    you can do with notepad - the filename can be hardcoded.

    If there is no way to do this without setting up a server and
    installing Perl, etc. to process the script, what is the smallest &
    simplest server, and what is the smallest and simplest script
    processor? I don't need more functionality, and doubt I will ever use
    it for anything else.

    I learned and used 'c' several years ago, but I don't even have a 'c'
    compiler now.

    Thanks
     
    , Aug 18, 2007
    #4
  5. wrote:
    > On Aug 17, 7:44 pm, mbstevens <> wrote:
    >> wrote:
    >>> Is there a way to create a form in a local html file where the
    >>> contents of the form are written to a local file when a 'save' button
    >>> is selected?
    >>> It would be nice if it was as easy as changing "somesite.com" to
    >>> "file:///C:/whatever" and "post" to "save"... in the following form:
    >>> <form action = "somesite.com" method="post">
    >>> <p> <textarea name="Text" rows="20" cols="80"> </textarea>
    >>> <input value="Send" type="submit"><input type="reset"> </p>
    >>> </form>
    >>> I would like to do this without using javascript, and without having
    >>> to set up a local server to serve the form.
    >>> Any help appreciated.

    >> It is not really that hard to set up a local server with CGI or LAMP, if
    >> you feel you really *must* use a local html file.
    >>
    >> On the other hand, Python comes with Tk and has hooks to other
    >> easy to use GUI packages, which might make more sense to use locally.
    >> Perl and Ruby have similar hooks. Is there anything really magic
    >> about an html file for your uses?

    >
    > I basically just need a local page I can load in Firefox that will
    > make Firefox act like notepad, where you can save a text area to a
    > file, but I don't even need to be able to select the filename, like
    > you can do with notepad - the filename can be hardcoded.
    >


    No you cannot. HTML forms post to server-side scripts, so you *need* the
    server. If you don't want the server then your must use the OS, put a
    shortcut to a text file and be done with it...

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Aug 19, 2007
    #5
  6. wrote:
    > I basically just need a local page I can load in Firefox that will
    > make Firefox act like notepad, where you can save a text area to a
    > file, but I don't even need to be able to select the filename, like
    > you can do with notepad - the filename can be hardcoded.


    Is this because Notepad is missing from your computer and you need a
    work-around?

    Anyway, no: there is no "save" option for HTML forms.
     
    Harlan Messinger, Aug 19, 2007
    #6
  7. J.O. Aho Guest

    wrote:

    > I basically just need a local page I can load in Firefox that will
    > make Firefox act like notepad, where you can save a text area to a
    > file, but I don't even need to be able to select the filename, like
    > you can do with notepad - the filename can be hardcoded.


    In the Mozilla.org browsers you can use XUL together with JavaScript to
    do what you want, a simple search at Google gave the following llink:

    http://www.captain.at/programming/xul/



    > If there is no way to do this without setting up a server and
    > installing Perl, etc. to process the script, what is the smallest &
    > simplest server, and what is the smallest and simplest script
    > processor?


    If looking for the smallest simplest http server, then thttp,
    http://www.acme.com/software/thttpd/

    For handling text, Perl may be the best language to use, otherwise php
    is easy to learn and a lot more stable than visualbasic.


    > I learned and used 'c' several years ago, but I don't even have a 'c'
    > compiler now.


    Poor excuse, you get one for free at http://gcc.gnu.org


    --

    //Aho
     
    J.O. Aho, Aug 19, 2007
    #7
    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. Michael Rogers

    Save a zip file locally?

    Michael Rogers, Jun 26, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    2,025
    DaveJohnson12@nomail.
    Jul 26, 2003
  2. kieran

    download an image and save locally

    kieran, Aug 4, 2004, in forum: ASP .Net
    Replies:
    9
    Views:
    2,581
    mxdev
    Dec 7, 2008
  3. Mrunal

    Save files locally

    Mrunal, Nov 26, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    427
    Peter Rilling
    Nov 26, 2004
  4. =?Utf-8?B?TWF0dA==?=

    Save a file locally for ASP.net 2

    =?Utf-8?B?TWF0dA==?=, May 12, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    5,049
    =?Utf-8?B?TWF0dA==?=
    May 15, 2006
  5. Terence
    Replies:
    28
    Views:
    1,331
    Terence
    Nov 30, 2009
Loading...

Share This Page