hi all,

i have created dynamic text fields using javascript,as far as i know its working properly,but i unable to store the dynamic text field values to the database ,first of all i am facing the problem to pass the values from the form...

plz any body can help me....
here is the script

<script language="javascript">
//add a new row to the table
function addRow()
{
//add a row to the rows collection and get a reference to the newly added row
var newRow = document.all("tblGrid").insertRow();
//add 3 cells (<td>) to the new row and set the innerHTML to contain text boxes
var oCell = newRow.insertCell();
oCell.innerHTML = "<input type='text' name='latestdate1' onKeyPress='return submitenter(this,event)'>";

oCell = newRow.insertCell();
oCell.innerHTML = "<input type='text' name='comments' onKeyPress='return submitenter(this,event)'>";

oCell = newRow.insertCell();
oCell.innerHTML = "<input type='text' name='rc1' onKeyPress='return submitenter(this,event)'> &nbsp;&nbsp;<input type='button' value='Delete' onclick='removeRow(this);'/>";
}

//deletes the specified row from the table
function removeRow(src)
{
/* src refers to the input button that was clicked.
to get a reference to the containing <tr> element,
get the parent of the parent (in this case case <tr>)
*/
var oRow = src.parentElement.parentElement;

//once the row reference is obtained, delete it passing in its rowIndex
document.all("tblGrid").deleteRow(oRow.rowIndex);
}

</script>

and this is in the form

<table id="tblGrid" style="table-layout:fixed">
<tr>
<td width="150px" class="tblhead">Date</td>
<td width="150px" class="tblhead">Comments</td>
<td width="250px" class="tblhead">Rc

<input type="button" value="Add" onClick="addRow();"/></td>
</tr>
<tr>
<td><input type="text" name="date" onkeypress="return submitenter(this,event)" value="<?=$contactdate?>" /></td>
<td><input type="text" name="comment1" onkeypress="return submitenter(this,event)" value="<?=$comments1?>"/></td>
<td><input type="text" name="rc2" onkeypress="return submitenter(this,event)" value="<?=$rc?>"/> &nbsp;&nbsp;<input type="button" value="Delete" onClick="removeRow(this);" /></td>
</tr>
</table>