Hi Fellas,
i have a html table with 5 <td> elements with an input in each one of them.
on the click event of a button:
so first row elements id would be something likePHP Code:<script type="text/javascript">
$.test = new Object();
$.test.i = new Object();
$.test.i.nCounter=1;
$(document).ready(function(){
$("#test").click(function(){
$.test.i.nCounter++;// increment to be embeded in the id of the new elements
var ix=$.test.i.nCounter;
$('#row1').clone().attr('id','row'+ix).appendTo('table.timesheet');
// now i need to reID each element inside the new row
('#row'+ix).find('#calendar').attr('id','date-'+ix);alert(document.getElementById('date-'+ix).id);// this errors : object #row2 has no method 'find' ( where 2 is ix)
});
});
</script>
name-1
job-1
dob-1......
and second row should be
name-2
job-2
dob-2......
or is there a better suggestion of trasversing and getting values of those elements
thanks in advance .......![]()





Reply With Quote