Hello,<br><br><br>I have added some rows of items using javascript.I need to use vaildator for the input values.<br><br>if i use the validator for any one of the variable in xxxItems,the rows that i added using javascript will disappear.<br>
<br><br>The following is my Html file<br><br><br><script><br><br>function openmemberPopup(val){<br><br>....................<br>....................<br>addRow();<br>}<br><br><br>function addRow() {<br>var rowStr = '<tr class="item">';<br>
rowStr += '<td><input type="text" id="member"></input><input type="hidden" id="hiddenmember"></input><input type="button" value="memberselectLabel" id="selectmember" onclick="openmemberPopup(this)"></input></td>';<br>
rowStr += '<td><input type="text" id="standardunitprice" size="8" class="alignright" readonly="1"></input></td>';<br>rowStr += '<td><input type="text" id="applicationunitprice" size="8" class="alignright"></input></td>';<br>
rowStr += '<td><input type="text" id="fixedunitprice" size="8" class="alignright"></input></td>';<br>rowStr += '<td><input type="text" id="mamhour" size="2" class="alignright" ></input></td>';<br>
rowStr += '<td><input type="text" id="lowertime" size="4" class="alignright" ></input></td>';<br>rowStr += '<td><input type="text" id="lowertimeunitprice" size="8" class="alignright" ></input></td>';<br>
rowStr += '<td><input type="text" id="uppertime" size="4" class="alignright" ></input></td>';<br>rowStr += '<td><input type="text" id="uppertimeunitprice" size="8" class="alignright" ></input></td>';<br>
rowStr += '<td><input type="hidden" id="rowno-1" /></td>';<br>rowStr += '</tr>';<br>$('#projectmemberItems').append(rowStr);<br> // $BL@:Y$N(BINDEX$B$r?6$jD>$9(B<br>resetIndex();<br>
}<br><br>// $BL@:Y$N(BINDEX$B$r?6$jD>$9(B<br>function resetIndex(){<br>var nameVal = 'layoutChildBody:partnermemberCreateForm:projectmemberItems:';<br>$('#projectmemberItems tr').each(function(idx, obj){<br>// $B9THV9f$r?6$jD>$9(B<br>
//$(obj).find('#rowno').text('' + (idx + 1));<br>// name$BB0@-$N(Bindex$B$r?6$j$J$*$9(B<br>$(obj).find('#member').attr('name', nameVal + idx + ':member');<br>$(obj).find('#hiddenmember').attr('name', nameVal + idx + ':hiddenmember');<br>
$(obj).find('#standardunitprice').attr('name', nameVal + idx + ':standardunitprice');<br>$(obj).find('#applicationunitprice').attr('name', nameVal + idx + ':applicationunitprice');<br>
$(obj).find('#fixedunitprice').attr('name', nameVal + idx + ':fixedunitprice');<br>$(obj).find('#mamhour').attr('name', nameVal + idx + ':mamhour');<br>$(obj).find('#lowertime').attr('name', nameVal + idx + ':lowertime');<br>
$(obj).find('#lowertimeunitprice').attr('name', nameVal + idx + ':lowertimeunitprice');<br>$(obj).find('#uppertime').attr('name', nameVal + idx + ':uppertime');<br>$(obj).find('#uppertimeunitprice').attr('name', nameVal + idx + ':uppertimeunitprice');<br>
$(obj).find('#rowno-1').attr('name', nameVal + idx + ':rowno-1');<br>});<br>}<br><br><br></script><br><br>..............................<br>..............................<br>..............................<br>
<br><br><tbody id="projectmemberItems"><br><tr class="item"><br><td><input type="text" id="member"></input><input type="hidden" id="hiddenmember"></input><br>
<input type="button" value="memberselectLabel" id="selectmember" onclick="openmemberPopup(this)"></input></td><br><td><input type="text" id="standardunitprice" size="8" class="alignright" readonly="1"></input></td><br>
<td><input type="text" id="applicationunitprice" size="8" class="alignright"></input></td><br><td><input type="text" id="fixedunitprice" size="8" class="alignright"></input></td><br>
<td><input type="text" id="mamhour" size="2" class="alignright"></input></td><br><td><input type="text" id="lowertime" size="4" class="alignright"></input></td><br>
<td><input type="text" id="lowertimeunitprice" size="8" class="alignright"></input></td><br><td><input type="text" id="uppertime" size="4" class="alignright"></input></td><br>
<td><input type="text" id="uppertimeunitprice" size="8" class="alignright"></input></td><br></tr><br></tbody><br><br><br>How can i use validator for this.<br>
<br><br>Thanks in advance,<br>$B%H%^%9!#(B<br><br><br><br><br><br><br><br>