i need to display the data in grids like msflexgrid in vb. so i wrote the following code. the problem is it works fine under ir but not in firefox. help me.
<html>
<head>
<title>Gettin g Sticky</title>
<script type="text/javascript">
var iC =0 , iR = 0 ;
var tblWidth =0 ,tblheight = 0 ,tblColspan =0,tblRowspan =0;
function addCell(){
tblheight = "20";tblWid th = "50"; tblColspan = "2";tblRows pan = "1";
mainDivElement = document.getEle mentById("huti" );
newNote = document.create Element("div");
newNote.setAttr ibute("id", "note" + iC);
newNote.style.w idth = tblColspan * tblWidth ;
newNote.style.h eight = tblRowspan * tblheight;
newNote.style.b order ="1px ridge";
// newNote.style.b orderleft = "0";
newNote.style.b ackgroundColor= "#cccccc";
newNote.style.p osition="absolu te";
newNote.style.t op = parseInt(tblRow span * iR * 21) + 'px';
newNote.style.l eft= parseInt(tblCol span * iC * 50) + 'px';
mainDivElement. appendChild(new Note);
newNote.innerHT ML = iC;
newNote.setAttr ibute('align',' center');
iC++;
}
function addRow() {
iR++;iC=0;
}
</script>
</head>
<body style="backgrou nd-image:url(../ba.gif)">
<form id="noteForm">
<input type="button" value="Add Cell" onClick="addCel l()"/>
<input type="button" value="Add Row" onClick="addRow ()"/>
</form>
<div id="huti" style="border:1 #000099 solid;overflow: auto;height:250 ;width:50%;back ground:#FFFFFF" >Digitech</div>
</body>
</html>
<html>
<head>
<title>Gettin g Sticky</title>
<script type="text/javascript">
var iC =0 , iR = 0 ;
var tblWidth =0 ,tblheight = 0 ,tblColspan =0,tblRowspan =0;
function addCell(){
tblheight = "20";tblWid th = "50"; tblColspan = "2";tblRows pan = "1";
mainDivElement = document.getEle mentById("huti" );
newNote = document.create Element("div");
newNote.setAttr ibute("id", "note" + iC);
newNote.style.w idth = tblColspan * tblWidth ;
newNote.style.h eight = tblRowspan * tblheight;
newNote.style.b order ="1px ridge";
// newNote.style.b orderleft = "0";
newNote.style.b ackgroundColor= "#cccccc";
newNote.style.p osition="absolu te";
newNote.style.t op = parseInt(tblRow span * iR * 21) + 'px';
newNote.style.l eft= parseInt(tblCol span * iC * 50) + 'px';
mainDivElement. appendChild(new Note);
newNote.innerHT ML = iC;
newNote.setAttr ibute('align',' center');
iC++;
}
function addRow() {
iR++;iC=0;
}
</script>
</head>
<body style="backgrou nd-image:url(../ba.gif)">
<form id="noteForm">
<input type="button" value="Add Cell" onClick="addCel l()"/>
<input type="button" value="Add Row" onClick="addRow ()"/>
</form>
<div id="huti" style="border:1 #000099 solid;overflow: auto;height:250 ;width:50%;back ground:#FFFFFF" >Digitech</div>
</body>
</html>
Comment