0

I am working on this simple site, and I want to be able to take the information from these fields in a form, and save them to a plain text file (like on the desktop or something).

Here is the form I have so far:

              <form id="mainform" class="pure-form pure-form-aligned">
                 <fieldset style="padding-top: 12px;">
                    <div class="pure-control-group">
                       <input id="service" class="pure-input" type="text" placeholder="Service">
                    </div>
                    <div class="pure-control-group">
                       <input id="username" class="pure-input" type="text" placeholder="Username">
                    </div>
                    <div class="pure-control-group">
                       <input id="email" class="pure-input" type="email" placeholder="Email Address">
                    </div>
                    <div class="pure-control-group">
                       <input id="password" class="pure-input" type="password" placeholder="Password">
                    </div>
                    <div class="pure-control-group">
                       <input id="vpassword" class="pure-inputs" type="password" placeholder="Verify Password">
                    </div>
                    <div class="pure-controls" style="margin-left: 0px;">
                       <button type="submit" class="pure-button pure-button-primary" id="button1" style="
                          margin-right: 15px; background-color:#99CCFF;">Submit</button>            
                       <button type="submit" class="pure-button pure-button-primary" id="button2" style="
                          width: 81px;margin-left: 15px;background-color:#99CCFF;">Clear</button>
                    </div>
                 </fieldset>
              </form>

I know about $POST for after the submit button is pressed but I figured this would be a bit different since it is going to a file. Probably JS I assume, would that be just like saving to a text file in a Java program?

erp
  • 2,950
  • 9
  • 45
  • 90
  • You cannot save to a file in javascript. You would have to use a server side language or flash. – imtheman Sep 16 '14 at 19:10
  • possible duplicate of [Javascript: Create and save file](http://stackoverflow.com/questions/13405129/javascript-create-and-save-file) – imtheman Sep 16 '14 at 19:11

0 Answers0