Hi,
i have a grid / table in html form as followings code,:-
[CODE=javascript] function addCritr(curno){
var f = document.frmC5W 002;
// check val 1 & val 2 range
if (f.txt_val1.val ue!="" && f.txt_val2.valu e!=""){
if(parseInt(f.t xt_val2.value)< =parseInt(f.txt _val1.value)){
alert("Value 2 cannot be less than Value 1!")
f.txt_val2.focu s();
return;
}
}
curno = curno + 1;
var grid = document.getEle mentById("Critr Grid");
var numRows = grid.rows.lengt h;
grid.insertRow( curno);
grid.rows[curno].insertCell(0);
grid.rows[curno].insertCell(1);
grid.rows[curno].cells[0].innerHTML = "<IMG SRC='../image/plussign.gif' onmouseover=thi s.style.cursor= 'hand' onclick='addCri tr("+curno+")'> ";
grid.rows[curno].cells[1].innerText = curno;
}
[/CODE]
[HTML]<HTML>
<TABLE cellspacing="1" cellpadding="1" id="CritrGrid" class="grid" ALIGN="center" width="95%">
<THEAD class="header">
<TH width="2%">&nbs p;</TH>
<TH width="3%">SEQ</TH>
</THEAD>
<TR>
<TD>
<IMG SRC="../image/plussign.gif" onmouseover=thi s.style.cursor= 'hand' onclick="addCritr(1);">
</TD>
<TD>1</TD>
</TR>
</HTML>
[/HTML]
After i'd click on the "plussign.g if", it will call the function "addCritr() ", and add 1 more row in grid "CritrGrid" using javascript (grid.rows[curno].insertCell(0); follow by grid.rows[curno].cells[0]....) ..
My question is after i'd add so many rows on the grid, and after i refresh the web page, all of the rows that i added using the javascript function will be become blank again..
how would i keep those rows & values after refresh the web page???
Anyone know bout these? Pls help!!!!~
Many Thanks ;-))
i have a grid / table in html form as followings code,:-
[CODE=javascript] function addCritr(curno){
var f = document.frmC5W 002;
// check val 1 & val 2 range
if (f.txt_val1.val ue!="" && f.txt_val2.valu e!=""){
if(parseInt(f.t xt_val2.value)< =parseInt(f.txt _val1.value)){
alert("Value 2 cannot be less than Value 1!")
f.txt_val2.focu s();
return;
}
}
curno = curno + 1;
var grid = document.getEle mentById("Critr Grid");
var numRows = grid.rows.lengt h;
grid.insertRow( curno);
grid.rows[curno].insertCell(0);
grid.rows[curno].insertCell(1);
grid.rows[curno].cells[0].innerHTML = "<IMG SRC='../image/plussign.gif' onmouseover=thi s.style.cursor= 'hand' onclick='addCri tr("+curno+")'> ";
grid.rows[curno].cells[1].innerText = curno;
}
[/CODE]
[HTML]<HTML>
<TABLE cellspacing="1" cellpadding="1" id="CritrGrid" class="grid" ALIGN="center" width="95%">
<THEAD class="header">
<TH width="2%">&nbs p;</TH>
<TH width="3%">SEQ</TH>
</THEAD>
<TR>
<TD>
<IMG SRC="../image/plussign.gif" onmouseover=thi s.style.cursor= 'hand' onclick="addCritr(1);">
</TD>
<TD>1</TD>
</TR>
</HTML>
[/HTML]
After i'd click on the "plussign.g if", it will call the function "addCritr() ", and add 1 more row in grid "CritrGrid" using javascript (grid.rows[curno].insertCell(0); follow by grid.rows[curno].cells[0]....) ..
My question is after i'd add so many rows on the grid, and after i refresh the web page, all of the rows that i added using the javascript function will be become blank again..
how would i keep those rows & values after refresh the web page???
Anyone know bout these? Pls help!!!!~
Many Thanks ;-))
Comment