DIV with scroll and innerHTML

Discussion in 'HTML' started by Hanoi, Aug 1, 2007.

  1. Hanoi

    Hanoi Guest

    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.
     
    Hanoi, Aug 1, 2007
    #1
    1. Advertising

  2. Hanoi

    Neredbojias Guest

    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.

    --
    Neredbojias
    Half lies are worth twice as much as whole lies.
     
    Neredbojias, Aug 1, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sathiamoorthy

    Enable Scroll up and scroll down in CR-report

    Sathiamoorthy, Nov 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    910
    zobalee
    Nov 28, 2006
  2. UJ
    Replies:
    1
    Views:
    602
    John Timney \(MVP\)
    Nov 1, 2006
  3. K Viltersten

    <div ... /> and <div ...></div>

    K Viltersten, Mar 30, 2009, in forum: ASP .Net
    Replies:
    4
    Views:
    775
  4. mscir
    Replies:
    3
    Views:
    334
    Martin Honnen
    Jun 26, 2005
  5. sonic
    Replies:
    5
    Views:
    296
    Randy Webb
    Jul 11, 2006
Loading...

Share This Page