Hi, I managed to get the following script to work
<html>
<head>
<title>Adding and Removing Text Boxes Dynamically</title>
<script type = "text/javascript">
var intTextBox=0;
//FUNCTION TO ADD TEXT BOX ELEMENT
function addElement()
{
intTextBox = intTextBox + 1;
var contentID = document.getElementById('content');
var newTBDiv = document.createElement('div');
newTBDiv.setAttribute('id','strText'+intTextBox);
newTBDiv.innerHTML = "<table><tr><td>Memory "+intTextBox+": <input type='text' id='Memory " + intTextBox + "' name='memory_size" + intTextBox + "'/></td><td><input type='text' id='Memory " + intTextBox + "' name='memory_size" + intTextBox + "'/></td></tr></table>";
contentID.appendChild(newTBDiv);
}
</script>
</head>
<body>
<p>Demo of Adding and Removing Text Box Dynamically using JavaScript</p>
<form method="post" action="php/admin_adddesktop1.php">
<p><a href="javascript:addElement();">Add</a><a href="javascript:removeElement();">Remove</a>
<table style="width: 100%">
<tr>
<td><div id="content" style="width: 268px"></div></td>
<td></td>
</tr>
<tr>
<td></td>
<td> </td>
</tr>
</table>
</p>
<input name="Submit1" type="submit" value="submit"></form>
</body>
</html>
How do I get the row and column in the javascript to appear in the html page. I want the row created by the javascript as the second row below the
<table style="width: 100%">
<tr>
<td><div id="content" style="width: 268px"></div></td>
<td></td>
</tr>