Blank all fields within a table
<p>I have a so large form estimated 170 input fields, divided into sub-section by html tables.
Below is my one of sub-section :-</p>

<pre><code>  &lt;table width="90%"  border=0 align="center" cellpadding="0" cellspacing="1" &gt;
    &lt;tr align="center"&gt; 
      &lt;th height="20" colspan="4"&gt; Upgradings / Repair Work 
        &lt;?php if($ResultRow-&gt;shipnam != '') echo(" for ".$ResultRow-&gt;shipnam);?&gt;
      &lt;/th&gt;
    &lt;/tr&gt;

    &lt;tr&gt; 
      &lt;td width="15%" height="20" align="right"&gt;Date est. start Upgrade : &lt;/td&gt;
      &lt;td height="20" width="30%"&gt;
        &lt;input name="est_start_upgrade" type="text" id="est_start_upgrade" size="10" maxlength="11" tabindex="1" onBlur="cal_prs_date1(this)" value="&lt;?php echo(trim($_POST['est_start_upgrade']));?&gt;" /&gt;
        &lt;a href="javascript:est_start_upgrade.popup();" tabindex="1" &gt;&lt;img src="../../common/date_component/img/cal.gif" width="16" height="16" border="0" alt="Click here to pick up the date"&gt;&lt;/a&gt;&amp;nbsp; 
      &lt;/td&gt;
            &lt;td width="15%" height="20" align="right"&gt; Date est. end Upgrade : &lt;/td&gt;
      &lt;td height="20" width="30%"&gt;
        &lt;input name="est_end_upgrade" type="text" id="est_end_upgrade" size="10" maxlength="11" tabindex="1" onBlur="cal_prs_date1(this)" value="&lt;?php echo(trim($_POST['est_end_upgrade']));?&gt;" /&gt; 
        &lt;a href="javascript:est_end_upgrade.popup();" tabindex="1" &gt;&lt;img src="../../common/date_component/img/cal.gif" width="16" height="16" border="0" alt="Click here to pick up the date"&gt;&lt;/a&gt;&amp;nbsp; 
      &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt; 
      &lt;td  height="20" align="right"&gt;Date actual start Upgrade : &lt;/td&gt;
      &lt;td height="20" &gt;
        &lt;input name="act_start_upgrade" type="text" id="act_start_upgrade" size="10" maxlength="11" tabindex="1" onBlur="cal_prs_date1(this)" value="&lt;?php echo(trim($_POST['act_start_upgrade']));?&gt;" /&gt;
        &lt;a href="javascript:act_start_upgrade.popup();" tabindex="1" &gt;&lt;img src="../../common/date_component/img/cal.gif" width="16" height="16" border="0" alt="Click here to pick up the date"&gt;&lt;/a&gt;&amp;nbsp; 
      &lt;/td&gt;
            &lt;td height="20" align="right"&gt; Date actual complete Upgrade : &lt;/td&gt;
      &lt;td height="20" &gt;
        &lt;input name="act_end_upgrade" type="text" id="act_end_upgrade" size="10" maxlength="11" tabindex="1" onBlur="cal_prs_date1(this)" value="&lt;?php echo(trim($_POST['act_end_upgrade']));?&gt;" /&gt; 
        &lt;a href="javascript:act_end_upgrade.popup();" tabindex="1" &gt;&lt;img src="../../common/date_component/img/cal.gif" width="16" height="16" border="0" alt="Click here to pick up the date"&gt;&lt;/a&gt;&amp;nbsp; 
      &lt;/td&gt;
    &lt;/tr&gt;       


    &lt;tr&gt; 
      &lt;td height="20" align="right"&gt;Date est. start Repair : &lt;/td&gt;
      &lt;td height="20" &gt;
        &lt;input name="est_start_repair" type="text" id="est_start_repair" size="10" maxlength="11" tabindex="1" onBlur="cal_prs_date1(this)" value="&lt;?php echo(trim($_POST['est_start_repair']));?&gt;" /&gt;
        &lt;a href="javascript:est_start_repair.popup();" tabindex="1" &gt;&lt;img src="../../common/date_component/img/cal.gif" width="16" height="16" border="0" alt="Click here to pick up the date"&gt;&lt;/a&gt;&amp;nbsp; 
      &lt;/td&gt;
          &lt;td height="20" align="right"&gt; Date est. end Repair : &lt;/td&gt;
      &lt;td height="20" &gt;
        &lt;input name="est_end_repair" type="text" id="est_end_repair" size="10" maxlength="11" tabindex="1" onBlur="cal_prs_date1(this)" value="&lt;?php echo(trim($_POST['est_end_repair']));?&gt;" /&gt; 
        &lt;a href="javascript:est_end_repair.popup();" tabindex="1" &gt;&lt;img src="../../common/date_component/img/cal.gif" width="16" height="16" border="0" alt="Click here to pick up the date"&gt;&lt;/a&gt;&amp;nbsp; 
      &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt; 
      &lt;td height="20" align="right"&gt;Date actual start Repair : &lt;/td&gt;
      &lt;td height="20" &gt;
        &lt;input name="act_start_repair" type="text" id="act_start_repair" size="10" maxlength="11" tabindex="1" onBlur="cal_prs_date1(this)" value="&lt;?php echo(trim($_POST['act_start_repair']));?&gt;" /&gt;
        &lt;a href="javascript:act_start_repair.popup();" tabindex="1" &gt;&lt;img src="../../common/date_component/img/cal.gif" width="16" height="16" border="0" alt="Click here to pick up the date"&gt;&lt;/a&gt;&amp;nbsp; 
      &lt;/td&gt;
          &lt;td height="20" align="right"&gt; Date actual complete Repair : &lt;/td&gt;
      &lt;td height="20" &gt;
        &lt;input name="act_end_repair" type="text" id="act_end_repair" size="10" maxlength="11" tabindex="1" onBlur="cal_prs_date1(this)" value="&lt;?php echo(trim($_POST['act_end_repair']));?&gt;" /&gt; 
        &lt;a href="javascript:act_end_repair.popup();" tabindex="1" &gt;&lt;img src="../../common/date_component/img/cal.gif" width="16" height="16" border="0" alt="Click here to pick up the date"&gt;&lt;/a&gt;&amp;nbsp; 
      &lt;/td&gt;
    &lt;/tr&gt;    

    &lt;tr&gt; 
      &lt;td height="20" align="right"&gt;Upgrading info : &lt;/td&gt;
      &lt;td height="20" &gt;
        &lt;input name="upgrading_info" type="text" id="upgrading_info" value="&lt;?php echo(trim($_POST['upgrading_info']));?&gt;" /&gt; &amp;nbsp; 
      &lt;/td&gt;
          &lt;td height="20" align="right"&gt;Repair info :&lt;/td&gt;
      &lt;td height="20" &gt;
        &lt;input name="repair_info" type="text" id="repair_info"   value="&lt;?php echo(trim($_POST['repair_info']));?&gt;" /&gt; &amp;nbsp; 
      &lt;/td&gt;
    &lt;/tr&gt;  

    &lt;tr&gt; 
      &lt;td height="20" align="right"&gt; Upgrading Builder : &lt;/td&gt;
      &lt;td height="20" &gt;
              &lt;div id="upgrading_builderdiv" style="display:inline"&gt;
                &lt;select name="upgrading_builder" id="upgrading_builder"  &gt;
              &lt;option value=""&gt;Please Select&lt;/option&gt;
              &lt;/select&gt;&lt;/div&gt;
         &amp;nbsp;
      &lt;/td&gt;
          &lt;td height="20" align="right"&gt;Upgrading shipyard :&lt;/td&gt;
      &lt;td height="20" &gt;
          &lt;div id="upgrading_yarddiv" style="display:inline"&gt;
              &lt;select name="upgrading_yard" id="upgrading_yard" &gt;
                &lt;option value=""&gt;Please Select&lt;/option&gt;
              &lt;/select&gt;
             &lt;/div&gt;
             &amp;nbsp;          
      &lt;/td&gt;
    &lt;/tr&gt;  


    &lt;tr&gt; 
      &lt;td height="20" align="right"&gt; Repair Builder : &lt;/td&gt;
      &lt;td height="20" &gt;
              &lt;div id="repair_builderdiv" style="display:inline"&gt;
                &lt;select name="repair_builder" id="repair_builder"  &gt;
              &lt;option value=""&gt;Please Select&lt;/option&gt;
              &lt;/select&gt;&lt;/div&gt;
         &amp;nbsp;
      &lt;/td&gt;
          &lt;td height="20" align="right"&gt;Repair shipyard :&lt;/td&gt;
      &lt;td height="20" &gt;
          &lt;div id="repair_yarddiv" style="display:inline"&gt;
              &lt;select name="repair_yard" id="repair_yard" &gt;
                &lt;option value=""&gt;Please Select&lt;/option&gt;
              &lt;/select&gt;
             &lt;/div&gt;
             &amp;nbsp;          
      &lt;/td&gt;
    &lt;/tr&gt;         
      &lt;/table&gt;  
</code></pre>

<p>Now I want to do blank all fields in this sub-section after checking some validations when submit the form.</p>

<p>One is that I do the fields blank one by one through fields name or id, But it will not a good to do the job, I am looking for the less code that do the job.</p>
