I don't know how to change the text box name?
for ex:(my table like this)
sl. country from to
1 aaa (txt_c1) 5/4/09 (txt_f1) 5/13/09 (txt_t1) // Now i delete this row.
2 bbb (txt_c2) 5/18/09 (txt_f2) 5/25/09 (txt_t2)
3 ccc (txt_c3) 6/2/09 (txt_f3) 6/15/09 (txt_t3) // now i delete this row.
4 eee (txt_c4) 7/15/09 (txt_f4) 7/25/09 (txt_t4)
remainder rows, after delete.
1 bbb (txtc_2) 5/18/09 (txt_f2) 5/25/09 (txt_t2) // here i want to change the text box name automatically (txtc_1, txtf_1, txtt_1) how?
2 eee (txtc_4) 7/15/09 (txt_f4) 7/25/09 (txt_t4) // here i want to change the text box name automatically (txtc_2, txt_f2, txt_t2) how?
the alert message is "[object HTMLInputElemen t] [object HTMLInputElemen t] [object HTMLInputElemen t] "
Thanks & Regards,
Susan.
for ex:(my table like this)
sl. country from to
1 aaa (txt_c1) 5/4/09 (txt_f1) 5/13/09 (txt_t1) // Now i delete this row.
2 bbb (txt_c2) 5/18/09 (txt_f2) 5/25/09 (txt_t2)
3 ccc (txt_c3) 6/2/09 (txt_f3) 6/15/09 (txt_t3) // now i delete this row.
4 eee (txt_c4) 7/15/09 (txt_f4) 7/25/09 (txt_t4)
remainder rows, after delete.
1 bbb (txtc_2) 5/18/09 (txt_f2) 5/25/09 (txt_t2) // here i want to change the text box name automatically (txtc_1, txtf_1, txtt_1) how?
2 eee (txtc_4) 7/15/09 (txt_f4) 7/25/09 (txt_t4) // here i want to change the text box name automatically (txtc_2, txt_f2, txt_t2) how?
Code:
for(var k=i;k<lastRow-1;k++){
var aRow = document.getElementById('txt_C' + (k+1));
var FDate = document.getElementById('txt_F' + (k+1));
var TDate = document.getElementById('txt_T' + (k+1));
tbl.rows[k].cells[0].innerHTML = (k-1)+1; // serial no
alert(aRow+'\t'+FDate+'\t'+TDate);
// aRow.name = ('txt_C' + k);
// FDate.name = ('txt_F' + k);
// TDate.name = ('txt_T' + k);
// tbl.rows[k].cells[1].childNodes[1].
}
Thanks & Regards,
Susan.
Comment