0

hi,
I have problem while developing web application in php.
I have one text box in which enter total nos.and in one div there are other text box and dropdownlist.
i want to show div repeatately until match the value of first text box to text box in that div ..please give me solution....

3
Contributors
6
Replies
7
Views
6 Years
Discussion Span
Last Post by manu555
0

<tr>
<td width="169" class="label">Total Boxes</td>
<td colspan="3" class="content"><input name="ttlBoxes" type="text" class="box" id="ttlBoxes" size="20" maxlength="255"
value="" /> </td>
</tr>
<tr>
<td class="label">Box</td>
<td class="label">
<select id="boxtype" name="boxtype">
<option value="select">Select</option>
<option value="Amb">Amb</option>
<option value="Frz">Frz</option>
<option value="Ref">Ref</option>
<option value="Gen">Gen</option>
</select>&nbsp;&nbsp;&nbsp;&nbsp;
<select id="box" name="box">
<option value="select">Select</option>
<option value="OurBox">Our Box</option>
<option value="DrBox">Dr.Box</option>
<option value="Other">Other</option>
</select>


Gross Weight
<input type="text" name="grWeight" id="grWeight" value="0" onclick="calc(this)" readonly="readonly"/></td>
<td class="label"><p>Box Nos.
<input name="boxno" type="text" class="box" id="boxno" size="20" maxlength="255" value=""
onblur="CalculateTotal()"/>
</p>
<p>Chargeble Weight
<input type="text" name="crWeight" id="crWeight" value="" />
</p></td>
<td class="label">
<p>Dimension
<input name="l" type="text" class="box" id="l" size="3" maxlength="255"
value="" />
x
<input name="b" type="text" class="box" id="b" size="3" maxlength="255"
value="" />
x
<input name="h" type="text" class="box" id="h" size="3" maxlength="255"
value="" />
</p>
<p>
<input type="button" value="Add More" onclick="changeIt()" />
</p></td>
</tr>


I want to show second <tr> </tr> fields repeating until match value of <input name="ttlBoxes" type="text" class="box" id="ttlBoxes" size="20" maxlength="255"
value="" />
and <input name="boxno" type="text" class="box" id="boxno" size="20" maxlength="255" value="" onblur="CalculateTotal()"/>

0

first of all, set id for your TR

<tr id=myrow style='display:block'>
.
.
.
</tr>

now add few lines in calculate total function

function calculatetotal()
{
.
.
.
.
.

	if(text1.value==text2.value)//here use proper syntax according to your elements
	{
             ///hide row 
	     document.getElementById("myrow").style.display='none';
	}
	else
	{
             //show row	
	     document.getElementById("myrow").style.display='block';
	}

}

Edited by urtrivedi: n/a

0

this solution is only for hide and show <tr>,
I want to show second row adding multiple times on new row.

please help me..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.