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....

Post what you tried?

<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()"/>

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';
	}

}

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

please help me..

Thanks

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.