Forum Moderators: open
The text is written to the layer by a function.
CSS works fine in IE6 & NS6, it's just NS4.7
Anybody any ideas at all.
</totally lost>
This is the function that writes to the layer
function displayIt(theStr,dname,Lname,iLname){
//if IE 4+
if (document.all)
document.all[dname].innerHTML=theStr;
//else if NS 4
else if (document.layers){
document[iLname].document[Lname].document.write(theStr);
document[iLname].document[Lname].document.close();
}
//else if NS 6 (supports new DOM)
else if (document.getElementById){
rng = document.createRange();
el = document.getElementById(dname);
rng.setStartBefore(el);
htmlFrag = rng.createContextualFragment(theStr);
while (el.hasChildNodes())
el.removeChild(el.lastChild);
el.appendChild(htmlFrag);
}
}
this is the cell in which the layer to be written to is in
<tr>
<td class="HLS" width="582" colspan="4" height="25" align="center">
<div id="d1" style="width:100%;height:25px"></div>
<ilayer id="iL1" width=100% height=25px><layer id="L1" width=100% height=25px></layer></ilayer>
</td>
</tr>
This is part of a much bigger page in which there are a further two cells of a similar nature
And its called by
displayIt('This is the string I want to write','d1','L1','iL1');
from another function.
Another consideration is that the implementation of <ilayer> is not terribly brilliant either.