Click here to Skip to main content
15,910,471 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Here i am having code but 3 text box i am enter two number addition operation perform after dissplay 3 text box plz help sir.

function addRow(tableID) {
           var table = document.getElementById(tableID);
           var rowCount = table.rows.length;

           var row = table.insertRow(rowCount);

           var colCount = table.rows[0].cells.length;
           for (var i = 0; i < colCount; i++) {
               var newcell = row.insertCell(i);
               newcell.innerHTML = table.rows[0].cells[i].innerHTML;
               switch (newcell.childNodes[0].type) {
                   case "text1":
                       newcell.childNodes[1].value = "";
                       break;
                   case "text2":
                       newcell.childNodes[0].value = "";
                       break;
                   case "text3":
                       newcell.childNodes[0].value = "";
                       break;
                   case "checkbox":
                       newcell.childNodes[0].checked = false;
                       break;

               }
           }
       }
Posted
Updated 31-Aug-12 1:01am
v2
Comments
ZurdoDev 31-Aug-12 8:21am    
The question is not clear in English. Can you explain it more clearly?
Dasaradhi_r 1-Sep-12 11:51am    
Sateesh, Your question is not clear.
Improve the question
Or explain what you are trying to achieve,
Or put the entire code so that your code can be examined.

1 solution

I think you want to generate a new row after clicking on add new row button.
check this link
add dynamic row[^]
If you want this feature please share i'll show you the example.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900