THIS IS THE FUNC that im calling at the end of another function -->
Expand|Select|Wrap|Line Numbers
- func test (id)
- var hmrc=0;
- var newrow;
- var tbl;
- var newcol , newinput;
- var loopcounter=0;
- tbl = doc.getElementById(id);
- //create a new row
- newrow = doc.createElement("TR");
- newcol = doc.createElement("TD");
- newcol.width = 80;
- newrow.appendChild(newcol);
- while ( loopcounter<x ){
- newcol = doc.createElement("TD");
- newcol.width = 80;
- //newcol.setAttribute((document.all ? "className" : "class"), "dtext");
- newcol.innerHTML = col1[loopcounter];
- newrow.appendChild(newcol);
- loopcounter++;
- }
- tbl.appendChild(newrow);
- __uid1++;
- var loopcounter=0;
- tbl = doc.getElementById(id);
- //create a new row
- newrow = doc.createElement("TR");
- newcol = doc.createElement("TD");
- newcol.width = 80;
- newrow.appendChild(newcol);
- while ( loopcounter<x ){
- newcol = doc.createElement("TD");
- newcol.width = 80;
- newcol.innerHTML =col2[loopcounter];
- newrow.appendChild(newcol);
- loopcounter++;
- }
- tbl.appendChild(newrow);
- __uid1++;
- h=parseInt (doc.getElementById('hrm').value);
- //alert(h);
- var ii= 0;
- var jj = 0;
- while (hmrc<h){
- loopcounter=0;
- newrow = doc.createElement("TR");
- newcol = doc.createElement("TD");
- newcol.width = 80;
- newcol.innerHTML="Test "+hmrc;
- newrow.appendChild(newcol);
- jj = 0;
- while ( loopcounter<x ){
- newcol = doc.createElement("TD");
- newcol.width = 80;
- newinput = doc.createElement("input");
- newinput.name = "data[test]["+loopcounter+"]["+hmrc+"]";
- newinput.size = 15;
- newinput.value = "0";
- newinput.id = "input"+ii+jj;
- newcol.appendChild(newinput);
- newrow.appendChild(newcol);
- loopcounter++;
- jj ++;
- }
- tbl.appendChild(newrow);
- hmrc++;
- ii++;
- }
- }
at the end of another function im calling above function like this --->
Expand|Select|Wrap|Line Numbers
- if(doc.getElementById('showchart').value=="Refresh"){
- test('testbody');
- }
[HTML] <div id="hidesave" style=" width:620px; height:178px;overflow-x:auto; overflow-y:auto;" class="listformtable">
<table border="0" title="Show Chart">
<!--DWLayoutTable-->
<tbody id="testbody">
</tbody>
</table>
</div>[/HTML]
Please post code in tags - moderator
guys it works fine in FF ....but IE !...plz help me !!
thanks in advance ...:)