Hi All,

I created input text in a JavaScript function.

When I try in browser, I cannot enter text into those fields.

Can someone tell me why and how to solve this?

HTML File
In this file, a function crtTable() will be called to create rows, columns and input.
HTML Code:
<form id="frmDetails" name="form1">
<table id="tblDetails" border="1">
<tr>
	<td>YEAR</td>
	<td><input class="txtName" type="TEXT" name="year" id="year"></td>
	<td></td>
</tr>
<tr>
	<td>NAME 1</td>
	<td><input class="txtName" type="TEXT" name="name1" id="name1"></td>
	<td></td>
<tr>
<tr>
	<td>NAME 2</td>
	<td><input class="txtName" type="TEXT" name="name2" id="name2"></td>
	<td id="adder" onclick="addRow()">[+]</td>
</tr>
</table> <!--tblDetails-->
<br>
<input type="button" value="Create Table" onclick="crtTable()">
</form>
<p id="pDetails"></p>
<table id="tblTax" border="1">
<tbody id="btblTax" onclick="crtTable()"></tbody>
</table> <!--tblTax-->
JavaScript
All the input text created in below code, cannot be inserted with text.

Pls help.

Code:
// row 2
	var tr2 = tbody.insertRow(-1);
	var td1 = tr2.insertCell(-1); td1.innerHTML = "Adjusted Income";	
	var td2 = tr2.insertCell(-1); 
	var inp1 = document.createElement("input"); // input Adjusted Income 1
	inp1.name = "inpAdjIncome1";
	inp1.id = "inpAdjIncome1";
	inp1.className = "txtCalc";
	td2.appendChild(inp1);
	var td3 = tr2.insertCell(-1);
	var inp2 = document.createElement("input"); // input Adjusted Income 2
	inp2.name = "AdjIncome2";
	inp2.id = "AdjIncome2";
	inp2.className = "txtCalc";
	td3.appendChild(inp2);
	var td4 = tr2.insertCell(-1); td4.innerHTML = "";
	var td5 = tr2.insertCell(-1); td5.innerHTML = "";
	
	if (numOfName > 2)
	{
		for (i=3; i<=numOfName; i++)
		{
			td = tr2.insertCell(-1); td.innerHTML = "";
		}
	}
	
	// row 3
	var tr3 = tbody.insertRow(-1);
	var td1 = tr3.insertCell(-1); td1.innerHTML = "+ Balancing Charge";
	var td2 = tr3.insertCell(-1); 
	var inp1 = document.createElement("input"); // input Balancing Charge 1
	inp1.name = "BalCharge1";
	inp1.id = "BalCharge1";
	inp1.className = "txtCalc";
	td2.appendChild(inp1);
	var td3 = tr3.insertCell(-1);
	var inp2 = document.createElement("input"); // input Balancing Charge 2
	inp2.name = "BalCharge2";
	inp2.id = "BalCharge2";
	inp2.className = "txtCalc";
	td3.appendChild(inp2);
	var td4 = tr3.insertCell(-1); td4.innerHTML = "";
	var td5 = tr3.insertCell(-1); td5.innerHTML = "";