title: HTML form needed to be saved in csv.file format
body: <p>This code runs succesfully..But my problem is,I need to add a function with a save button that will save this form in a csv.file format.How could i do that?What modification can be done so that i can fullfill my requirement.I will post the whole code..Pls help me with this...TQ</p>
  
  <pre><code>&lt;form="form1" action="process.csv" method="post"&gt;
    &lt;div&gt; TESTER  &lt;input type="text"/&gt; 
      DATE&lt;input type="text" /&gt;       
      EMP  NO  &lt;input type="text" /&gt;  
      6S DONE  &lt;input type="text" /&gt;
      &lt;br /&gt;
      &lt;br /&gt;
      WW  &lt;input type="text" size="8"maxlength="8"/&gt;      
      NAME  &lt;input type="text" /&gt;     
      SHIFT&lt;input type="text" /&gt;
      &lt;br /&gt;
      &lt;br /&gt;
      &lt;br /&gt;
    &lt;/div&gt;
    PASSOVER (Please verify Summit Receipe &amp; Storm before start shift)
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;                    
    Summit Receipe OK ?                   
    &lt;select name=""&gt;                      
      &lt;option value="" style="display:none;"&gt;&lt;/option&gt;        
      &lt;option value="Yes"&gt;Yes&lt;/option&gt;                
      &lt;option value="No"&gt;No&lt;/option&gt;              
    &lt;/select&gt;     
    Motif/ Storm OK ?                     
    &lt;select name=""&gt;                      
      &lt;option value="" style="display:none;"&gt;&lt;/option&gt;        
      &lt;option value="Yes"&gt;Yes&lt;/option&gt;                
      &lt;option value="No"&gt;No&lt;/option&gt;              
    &lt;/select&gt;                     
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;SCRIPT TYPE="text/javascript"&gt;
      function addRowToTable()
        {
          var tbl = document.getElementById('tblSample');
          var lastRow = tbl.rows.length;
          // if there's no header row in the table, then iteration = lastRow + 1
          var iteration = lastRow;
          var row = tbl.insertRow(lastRow);
          // left cell
          var cellLeft = row.insertCell(0);
          var textNode = document.createTextNode(iteration);
          cellLeft.appendChild(textNode);
          // right cell
          var cellRight = row.insertCell(1);
          var el = document.createElement('input');
          el.type = 'text';
          el.name = 'txtRow' + iteration;
          el.id = 'txtRow' + iteration;
          el.size = 40;
  
          el.onkeypress = keyPressTest;
          cellRight.appendChild(el);
          // insert cell
          var cellRight1 = row.insertCell(2);
          var el1 = document.createElement('input');
          el1.type = 'text';
          el1.name = 'txtRow' + iteration;
          el1.id = 'txtRow' + iteration;
          el1.size = 40;
  
          el1.onkeypress = keyPressTest;
          cellRight1.appendChild(el1);
  
          // insert cell
          var cellRight2 = row.insertCell(3);
          var el2 = document.createElement('input');
          el2.type = 'text';
          el2.name = 'txtRow' + iteration; 
          el2.id = 'txtRow' + iteration;
          el2.size = 40;
  
          el2.onkeypress = keyPressTest;
          cellRight2.appendChild(el2);
  
          // insert cell
          var cellRight3 = row.insertCell(4);
          var el3 = document.createElement('input');
          el3.type = 'text';
          el3.name = 'txtRow' + iteration;
          el3.id = 'txtRow' + iteration;
          el3.size = 40;
  
          el3.onkeypress = keyPressTest;
          cellRight3.appendChild(el3);
  
          // insert cell
          var cellRight4 = row.insertCell(5);
          var el4 = document.createElement('input');
          el4.type = 'text';
          el4.name = 'txtRow' + iteration;
          el4.id = 'txtRow' + iteration; 
          el4.size = 40;
  
          el4.onkeypress = keyPressTest;
          cellRight4.appendChild(el4);
  
          // insert cell
          var cellRight5 = row.insertCell(6);
          var el5 = document.createElement('input');
          el5.type = 'text';
          el5.name = 'txtRow' + iteration;
          el5.id = 'txtRow' + iteration;
          el5.size = 40;
  
          el5.onkeypress = keyPressTest;
          cellRight5.appendChild(el5);
  
          // insert cell
          var cellRight6 = row.insertCell(7);
          var el6 = document.createElement('input');
          el6.type = 'text';
          el6.name = 'txtRow' + iteration;
          el6.id = 'txtRow' + iteration;
          el6.size = 40;
  
          el6.onkeypress = keyPressTest;
          cellRight6.appendChild(el6);
  
          // insert cell
          var cellRight7 = row.insertCell(8);
          var el7 = document.createElement('input');
          el7.type = 'text';
          el7.name = 'txtRow' + iteration;
          el7.id = 'txtRow' + iteration;
          el7.size = 40;
  
          el7.onkeypress = keyPressTest;
          cellRight7.appendChild(el7);
  
          // insert cell
          var cellRight8 = row.insertCell(9);
          var el8 = document.createElement('input');
          el8.type = 'text';
          el8.name = 'txtRow' + iteration;
          el8.id = 'txtRow' + iteration;
          el8.size = 40;
  
          el8.onkeypress = keyPressTest;
          cellRight8.appendChild(el8);
        }
  
      function keyPressTest(e, obj){
          var validateChkb = document.getElementById('chkValidateOnKeyPress');
            if (validateChkb.checked) {
              var displayObj = document.getElementById('spanOutput');
              var key;
              if(window.event) {
                key = window.event.keyCode; 
              }
              else if(e.which) {
                key = e.which;
              }
              var objId;
              if (obj != null) {
                objId = obj.id;
              } 
              else {
                objId = this.id;
              }
              displayObj.innerHTML = objId + ' : ' + String.fromCharCode(key);
            }
        }
  
      function removeRowFromTable(){
          var tbl = document.getElementById('tblSample');
          var lastRow = tbl.rows.length;
          if (lastRow &gt; 2) tbl.deleteRow(lastRow - 1);
        }
      function openInNewWindow(frm){
          // open a blank window
          var aWindow = window.open('', 'TableAddRowNewWindow',
            'scrollbars=yes,menubar=yes,resizable=yes,toolbar=no,width=400,height=400');
  
          // set the target to the blank window
          frm.target = 'TableAddRowNewWindow';
  
          // submit
          frm.submit();
        }
  
      function validateRow(frm){
        var chkb = document.getElementById('chkValidate');
        if (chkb.checked) {
          var tbl = document.getElementById('tblSample');
          var lastRow = tbl.rows.length - 1;
          var i;
          for (i=1; i&lt;=lastRow; i++) {
            var aRow = document.getElementById('txtRow' + i);
            if (aRow.value.length &lt;= 0) {
              alert('Row ' + i + ' is empty');
              return;
            }
          }
        }
        openInNewWindow(frm);
      }
      &lt;/SCRIPT&gt;
      &lt;form action="tableaddrow_nw.html" method="get"&gt;
        &lt;p&gt;
          &lt;input type="button" value="Add" onclick="addRowToTable();" /&gt;
          &lt;input type="button" value="Delete" onclick="removeRowFromTable();" /&gt;
        &lt;/p&gt;
        &lt;p&gt;
        &lt;/p&gt;
        &lt;table border="1" id="tblSample"&gt;
          &lt;tr&gt;
            &lt;TH&gt;Num&lt;/TH&gt;
            &lt;TH&gt;Lot Number&lt;/TH&gt;
            &lt;TH&gt;Location&lt;/TH&gt;
            &lt;TH&gt;Total In&lt;/TH&gt;
            &lt;TH&gt;1 * Test&lt;/TH&gt;
            &lt;Th&gt;2 * Test&lt;/TH&gt; 
            &lt;TH&gt;3 * Test&lt;/TH&gt;
            &lt;TH&gt;Total Out&lt;/TH&gt;
            &lt;TH&gt;Lot Status&lt;/TH&gt;
            &lt;TH&gt;Remark&lt;/TH&gt;
  </code></pre>
  
  <p>Sorry for the long post..If u guys think this coding shud be improved..Pls let me knw</p>