how to perform addition/multiplication on the textboxes that are appear in loop?
<p>hi everryone my promblem is that i apply loop on one row of table ,the exceution of loop depends on the user input in the text mean whatever the number user write in the textbox repective number of rows will be display.Now each row contain textbox,comboxbox on selcting value from combobox n entering value in textbox from first three column ,result will display.The promblem is ths that ths condition only in the first row nt in second row .what can i do to overcome ths.</p>

<p>javascriptng code </p>

<pre><code>&lt;script&gt;
function getText3(){
var in1=document.getElementById('in1').value;
var in2=document.getElementById('in2').value;
var in4=document.getElementById('in4').value;
var in3=(in1*in2*in4*30)/1000;
document.getElementById('in3').value=in3.toFixed(2 );

}
&lt;/script&gt;
</code></pre>

<p>here i get the value of combobox n textbox by their ids n store the result in other textbox i.e in3</p>

<p>coding of table</p>

<pre><code>&lt;/head&gt;
&lt;body&gt;


 &lt;table border="1" align="center" id="wr123"&gt;
        &lt;?php $numberofrow = $de;?&gt;
&lt;?php for($counter = 1;$counter&lt;=$numberofrow;$counter++){ ?&gt;
&lt;tr&gt;
    &lt;th&gt;WAS&lt;/th&gt;
    &lt;th&gt;NO.&lt;/th&gt;
    &lt;th&gt;AVERAGE&lt;/th&gt;
    &lt;th&gt;APPROX&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
    &lt;td&gt;Tube&lt;/td&gt;
    &lt;td&gt;
    &lt;select id="in4" name="t1" onclick="getText3()" &gt;
    &lt;option value="0"&gt;0&lt;/option&gt;
    &lt;option value="12"&gt;12&lt;/option&gt;
    &lt;option value="18"&gt;18&lt;/option&gt;
    &lt;option value="24"&gt;24&lt;/option&gt;
    &lt;option value="75"&gt;75&lt;/option&gt;
    &lt;/select&gt;
    &lt;/td&gt;
    &lt;td&gt;
    &lt;input type="text" name="t2" id="in1" onclick="getText3()" /&gt;
    &lt;/td&gt;
    &lt;td&gt;
    &lt;select name="a1" id="in2" onclick="getText3()" &gt;
    &lt;option value="0"&gt;0&lt;/option&gt;
    &lt;option value="1"&gt;1&lt;/option&gt;
    &lt;option value="2"&gt;2&lt;/option&gt;
    &lt;option value="3"&gt;3&lt;/option&gt;
    &lt;option value="4"&gt;4&lt;/option&gt;
    &lt;option value="5"&gt;5&lt;/option&gt;
    &lt;option value="6"&gt;6&lt;/option&gt;
    &lt;option value="7"&gt;7&lt;/option&gt;
    &lt;option value="8"&gt;8&lt;/option&gt;
    &lt;/select&gt;
    &lt;/td&gt;
    &lt;td&gt;
    &lt;input type="text" id="in3" name="username" readonly="readonly" /&gt;
    &lt;/td&gt;
    &lt;td&gt;
    &lt;tr&gt;
    &lt;?php }?&gt;
</code></pre>

<p>result is display like ths</p>

<p>WAS     NO.     AVERAGE     APPROX</p>

<p>2   3    4          result display here</p>

<p>WAS     NO.     AVERAGE     APPROX</p>

<p>2   3   4       no result</p>
