I googled and search SO but can't find anything relates to me.
http://jsfiddle.net/aravinth/Ad22d/90/
In this fiddle, cloned the table rows using ADD ROW
in that table row click Add Expenses shows the popup
it is also cloned when click the PLUS icon
...
My problem starts here now i click the first row add expense button
, 3 rows cloned in popup then click the second row add expenses
it shows three rows but i need to show only one column
(that is default one)...
Please suggest some idea...Thank You
I have added following method on addExpenses
buttons (i.e. Add onclick="addExpenses();"
attribute to all addExpenses
buttons.)
function addExpenses()
{
var row = document.getElementById("expenseTable");
var table = document.getElementById("expenseParticulars");
var rowcount=table.rows.length-1;
for(var i=2;i<=rowcount;)
{
table.deleteRow(i);
rowcount--;
}
var clone = row.rows[1];
var addExpenses = clone.cells[3].getElementsByTagName('input')[0];
addExpenses.disabled = false;
counter=2;
}
Please refer this jsfiddle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With