I have a rather simple page and I can't get it to pass the dynamic fields that I add using the add button. When I submit it, I only get the fields that are hard coded in the body. Is there a step that I'm missing? Here is the code for the page:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Sample table</title>
<script>
function addRowToTable()
{
var tbl = document.getElementById('tblSample');
var lastRow = tbl.rows.length;
var iteration = lastRow;
var row = tbl.insertRow(lastRow);
num = iteration -1
var cell = row.insertCell(0);
var field = document.createElement('input');
field.setAttribute('type','text');
field.setAttribute('name',"qty"+num);
field.setAttribute('value',num);
field.setAttribute('size',3);
cell.appendChild(field);
}
</script>
<meta name="Microsoft Theme" content="blends 000, default">
<meta name="Microsoft Border" content="tlb, default">
</head>
<body>
<form method="POST" name="Order Form" action="--WEBBOT-SELF--" onSubmit="">
<!--webbot bot="SaveResults" startspan U-File="_private/form_results.txt"
S-Format="TEXT/CSV" S-Label-Fields="TRUE" S-Email-Address="clflyer@mchsi.com"
S-Email-Format="TEXT/PRE" --><strong>[FrontPage Save Results Component]</strong><!--webbot
bot="SaveResults" endspan -->
<!-- <form action="tableaddrow_nw.html" method="get">-->
<table border="1" id="tblSample" width="292">
<tr>
<th width="282" align="left">Your Order</th>
</tr>
<tr>
<th width="282" align="left" valign="bottom">Qty.</th>
</tr>
<tr>
<td width="282" align="left" valign="bottom"><input type="text" name="txtQty1" size="3" value = "1" readonly></td>
</tr>
</table>
<input type="button" value="Add" onclick="addRowToTable();" />
<input type="submit" value="Submit" name="B1">
</form>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Sample table</title>
<script>
function addRowToTable()
{
var tbl = document.getElementById('tblSample');
var lastRow = tbl.rows.length;
var iteration = lastRow;
var row = tbl.insertRow(lastRow);
num = iteration -1
var cell = row.insertCell(0);
var field = document.createElement('input');
field.setAttribute('type','text');
field.setAttribute('name',"qty"+num);
field.setAttribute('value',num);
field.setAttribute('size',3);
cell.appendChild(field);
}
</script>
<meta name="Microsoft Theme" content="blends 000, default">
<meta name="Microsoft Border" content="tlb, default">
</head>
<body>
<form method="POST" name="Order Form" action="--WEBBOT-SELF--" onSubmit="">
<!--webbot bot="SaveResults" startspan U-File="_private/form_results.txt"
S-Format="TEXT/CSV" S-Label-Fields="TRUE" S-Email-Address="clflyer@mchsi.com"
S-Email-Format="TEXT/PRE" --><strong>[FrontPage Save Results Component]</strong><!--webbot
bot="SaveResults" endspan -->
<!-- <form action="tableaddrow_nw.html" method="get">-->
<table border="1" id="tblSample" width="292">
<tr>
<th width="282" align="left">Your Order</th>
</tr>
<tr>
<th width="282" align="left" valign="bottom">Qty.</th>
</tr>
<tr>
<td width="282" align="left" valign="bottom"><input type="text" name="txtQty1" size="3" value = "1" readonly></td>
</tr>
</table>
<input type="button" value="Add" onclick="addRowToTable();" />
<input type="submit" value="Submit" name="B1">
</form>
</body>
</html>