DIV with scroll and innerHTML

H

Hanoi

Hi,

I can't understand why the code below doesn't works in IE but It works
in Firefox.

<html>
<head><title></title>
<script>
function change(){
var divtext=document.getElementById("TEXT");

divtext.innerHTML="change<br>change<br>change<br>change";
}
</script>
</head>

<body onLoad="change();">
<table>
<tr><td>
<table>
<tr><td>CHANGE</td></tr>
<tr><td><div id='TEXT' style=" overflow-y: auto; height:
200px;"></div></td></tr>
</table>
</td></tr>
</table>
</body>
</html>

Thanks.
 
N

Neredbojias

Well bust mah britches and call me cheeky, on Wed, 01 Aug 2007 12:35:42 GMT
Hanoi scribed:
Hi,

I can't understand why the code below doesn't works in IE but It works
in Firefox.

<html>
<head><title></title>
<script>
function change(){
var divtext=document.getElementById("TEXT");

divtext.innerHTML="change<br>change<br>change<br>change";
}
</script>
</head>

<body onLoad="change();">
<table>
<tr><td>
<table>
<tr><td>CHANGE</td></tr>
<tr><td><div id='TEXT' style=" overflow-y: auto; height:
200px;"></div></td></tr>
</table>
</td></tr>
</table>
</body>
</html>

Thanks.

Ah, it is a mystery, ain't it? Now with a url, I might have actually been
able to be where you screwed up, but alas, you've parlayed your fauxes pas.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top