How to save a newly created dropdown and textfield in my database that are created from clicking a botton
<p>I have this code on my page. It creates a checkbox, dropdown and textbox in one table row by the click of a botton. My issue is, when i click the save botton it doesnt save the created checkbox, dropdown and textbox, it only saves the one that was first showing on the page.
        
function addRow(tableID) 
{
            var table = document.getElementById(tableID);</p>

<pre><code>        var rowCount = table.rows.length;
        var row = table.insertRow(rowCount);

        var colCount = table.rows[0].cells.length;

        for(var i=0; i&lt;colCount; i++) {

            var newcell = row.insertCell(i);

            newcell.innerHTML = table.rows[0].cells[i].innerHTML;
            //alert(newcell.childNodes);
            switch(newcell.childNodes[0].type) {
                case "text":
                        newcell.childNodes[0].value = "".id = "percent";
                        break;
                case "checkbox":
                        newcell.childNodes[0].checked = false.id = "checkbox";
                        break;
                case "create_select_box":
                        newcell.childNodes[0].selectedIndex = "0" .id = "percentage";
                        break;
            }
        }
    }
    function deleteRow(tableID) {
        try {
        var table = document.getElementById(tableID);
        var rowCount = table.rows.length;

        for(var i=0; i&lt;rowCount; i++) {
            var row = table.rows[i];
            var chkbox = row.cells[0].childNodes[0];
            if(null != chkbox &amp;&amp; true == chkbox.checked) {
                if(rowCount &lt;= 1) {
                    alert("Cannot delete all the rows.");
                    break;
                }
                table.deleteRow(i);
                rowCount--;
                i--;
            }


        }
        }catch(e) {
            alert(e);
        }
    }
</code></pre>

<p> </p>
