I want to Create a row as the same as above

<HTML>
<HEAD>
    <TITLE> TESTING</TITLE>

</HEAD>
<BODY>

    <INPUT type="button" value="Add Row"/>

  

    <TABLE id="dataTable" width="350px" border="1">
        <tr bgcolor="#0099FF">
    <th width="88" bgcolor="#66CCFF" scope="col">Code</th>
    <th width="289" bgcolor="#66CCFF" scope="col">Product</th>
    <th width="35" bgcolor="#66CCFF" scope="col">Qty</th>
    <th width="144" bgcolor="#66CCFF" scope="col">Rate</th>
    <th width="146" bgcolor="#66CCFF" scope="col">Value</th>
  </tr>



<!----- Same as this Row -----!>
  <tr>
    <td>
    
    <label>
      <select id="code"  onChange="ajaxFunction()">
       
        <?php
          while($info=mysql_fetch_array($result1)){
     $id=$info['id'];
     $code=$info['code'];
echo '<option value="'.$id.'">'.$code.'</option>';
      }
        ?>
        
      </select>
    </label></td>
    <td><input name="proname" type="text" id="proname" size="50" readonly="readonly" /></td>
    <td><label>
      <input NAME="qty" type="text" id="qty" size="2" onchange="CalculateTotal1()"  />
    </label></td>
    <td><input name="rate" type="text" id="rate"  onchange="CalculateTotal2()"/></td>
    <td><input name="tot" type="text" id="tot" readonly="readonly" />



</td>

<!----- END of Row -----!>


  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><label>
      
    </label></td>
    <td>&nbsp;</td>
    <td>Total</td>
    <td><input name="textfield4" type="text" id="textfield4" readonly="readonly" /></td>
  </tr>
    </TABLE>



</BODY>
</HTML>

You want to create that row via javascript?
In this case you can add an id to the row, then find that element by id, and copy it's innerHTML.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.