I have found a Javascript that I would like to modify for use in my backend admin. It generates a table row, but instead of just generating a table row with the text, I'd like to generate a CFINPUT. I have "textarea" where I'd like to generate the CFINPUT if that helps any.

Here's the code I've modified so far:

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function addRow(id){
var tbody = document.getElementById
(id).getElementsByTagName("TBODY")[0];
var row = document.createElement("TR")
var td1 = document.createElement("TD")
td1.appendChild(document.createTextNode("textarea"))
var td2 = document.createElement("TD")
td2.appendChild(document.createTextNode("appmake"))
var td3 = document.createElement("TD")
td3.appendChild(document.createTextNode("appsku"))
var td4 = document.createElement("TD")
td4.appendChild(document.createTextNode("appcost"))
var td5 = document.createElement("TD")
td5.appendChild(document.createTextNode("appretail"))
var td6 = document.createElement("TD")
td6.appendChild(document.createTextNode("appsale"))
var td7 = document.createElement("TD")
td7.appendChild(document.createTextNode("appdesc"))
var td8 = document.createElement("TD")
td8.appendChild(document.createTextNode("apptype"))
var td9 = document.createElement("TD")
td9.appendChild(document.createTextNode("appshipweight"))
var td10 = document.createElement("TD")
td10.appendChild(document.createTextNode("appshipmethod"))
row.appendChild(td1);
row.appendChild(td2);
row.appendChild(td3);
row.appendChild(td4);
row.appendChild(td5);
row.appendChild(td6);
row.appendChild(td7);
row.appendChild(td8);
row.appendChild(td9);
row.appendChild(td10);
tbody.appendChild(row);
}
// End -->
</script>


<a href="javascript:addRow('myTable')">add row</a>
<p>
<table id="myTable" cellspacing="0" border="1">
<tbody>
<tr>
<td><b>appid</b></td>
<td><b>appmake</b></td>
<td><b>appsku</b></td>
<td><b>appcost</b></td>
<td><b>appretail</b></td>
<td><b>appsale</b></td>
<td><b>appdesc</b></td>
<td><b>apptype</b></td>
<td><b>appshipweight</b></td>
<td><b>appshipmethod</b></td>
</tr>
</tbody>
</table>

Any help greatly appreciated. Already posted in the CF forum but no help so far. I don't know much about Javascript so a code example would help more than an explanation if possible.

TIA,
Donna