Somewhere in NN docs on DHTML there was a phrase
that ANY positioned content is treated as layer..
That's what is used widly to use the same
positioned DIV tag in both browsers instead of having
layer for NN and Divs for mie..
Interesting question, about rewriting content..
but NN loose positioning and some other style settings when you do document.open()
So you can write in TD this way, but it will be placed in
0,0 coordinates, meanwhile clipping of TD remains on position of original td.
So in test below I see only few bottom pixels of new text
clipped out by TD rectangle.
If someone would be able to find way for fixing position/clipping after writing in TD, than this way may be very usefull.
<html>
<head>
<style>
.custom1{
position:relative;
background-Image:url(image
}
</style>
<script>
function doDo(){
if(document.layers)
with(document["myOne"]){
document.open();
document.writeln("Foo");
document.close();
}
}
</script>
</head>
<body>
<table>
<tr>
<td ID="myOne" class="custom1">
cell 1
</td>
<td >
cell 2
</td>
</tr>
</table>
<a href="javascript:void(0);"
click to change background
</a>
</body>
</html>
Main Topics
Browse All Topics





by: djbusychildPosted on 2000-10-27 at 23:13:27ID: 4954601
thanks for sharing points. ^^;
your tip opens up a whole lot ... does that mean I can dynamically alter table cell content??? interesting.