hi all,
thanks for giving time.
now i have a table of coding given below.this given code for add row in the table.first column name is callernumber.and i pass hidden parameter with this column to get "callernuber" value given by the
jsp text box.
text value ="document.timestatusForm.callernumber.value "
and i get this hidden value from servlet.u can see in the code.
in jsp page one add row button and save button.
when user click on add row button, row will be added with given input.
this works fine.user can add many rows with input.
after user press save button,
servlet is called and get hidden value.
but i get only last value of row.i want to get all values of all rows.
it should be work using making array of hidden parameter.
but i dont know.
please give some advise.
------------------------------------------------
this code for add row in the table with input.
function addrows(cid){
var rowsAdded = 0;
var tbody = document.getElementById(cid).getElementsByTagName("TBODY")[0];
rows = tbody.getElementsByTagName("TR");
len = rows.length;
var row = document.createElement("TR");
var t1 = document.createElement("TD");
------------------------------------
t1.innerHTML=document.timestatusForm.callernumber.value
+ '<input type="hidden" name="callernumber" value=' +
document.timestatusForm.callernumber.value + '> ';
--------------------------------------------
var t2 = document.createElement("TD");
if (document.timestatusForm.status[0].checked == true )
{
t2.innerHTML='Busy'
}
else if (document.timestatusForm.status[1].checked == true )
{
t2.innerHTML='Drop'
}
else if (document.timestatusForm.status[2].checked == true )
{
t2.innerHTML='Forward'
}
var t3 = document.createElement("TD");
t3.innerHTML=document.timestatusForm.fromdate.value + document.timestatusForm.fromtime.value
var t4 = document.createElement("TD");
t4.innerHTML=document.timestatusForm.todate.value + " " + document.timestatusForm.totime.value
var t5 = document.createElement("TD");
t5.innerHTML='<a href="#"> Delete </a>'
row.appendChild(t1)
row.appendChild(t2)
row.appendChild(t3)
row.appendChild(t4)
row.appendChild(t5)
tbody.appendChild(row)
rowsAdded++;
}