Click to See Complete Forum and Search --> : Problems changing DIV contents - i'm confused!?!


Dudsmack
10-24-2003, 03:09 PM
The following works in IE but not in Mozilla/Netscape (gecko browsers). This all looks allright to me can someone tell me what I'm doing wrong?
.......
<head>
.......
<style>
<!--
#tim {position: absolute;
left: 10px;
top: 1px;
width: 140px;
height: 91px;
}
-->
</style>
</head>
...........
<body>
<div id="tim" style="width: 85; height: 36">
TEST TEST
</div>

<script language="Javascript">

document.tim.innerHTML = 'raw change';

tim.innerHTML = 'raw change';

</script></body>


Both those lines work in IE...just not gecko...why?

Sam
10-24-2003, 03:12 PM
diiv support is different in netscape than ie... a lot of things won't work the same... i suggest you look into <layer> tags

Dudsmack
10-24-2003, 03:23 PM
Only Netscape 4 and earlier uses the layers tag...I have a whole set of function to handle that and they work fine. Gecko is W3C DOM compliant (just as is IE 6) so I'm almost possitive this is w3c compliant as well....that's why i'm so confused.

Fang
10-25-2003, 02:51 AM
document.getElementById('tim').innerHTML = 'raw change';