[thelist] [JS]: document.write vs innerHTML

Ben Henick persist1_pdx at yahoo.com
Mon Oct 16 12:51:38 CDT 2000

--- "J.J.SOLARI" <jjsolari at pobox.com> wrote:
> Hello all,
> I came across a weird behaviour of IE5 Mac edition regarding some
> javascript
> code ; here is a test page demonstrating the problem:
> <div id="palette">
> </div>
> if (ie)
> {
> document.all.palette.innerHTML = tmp ;
> It should build two rows of twelve colored cells.
> Netscape 4.08 does what is expected, whereas IE5 just displays the
> last row, and I'm told that it works fine on Win versions.
> P.S.: This page is online at: <http://www.yoyodesign.org/tmp/cb.html>

Perhaps I'm being too simplistic to be any help, but what is the chance
that the absence of content in the named DIV is making the browser

It's the sort of error I'd expect from Netscape not IE, but stranger
things HAVE happened...

Anybody who remembers the multiple-body-tag trick, or the Infamous
Daylight Savings Bug, or has actually tried to write stylesheets for
IE3, will understand the spirit in which I make my suggestion.

Ben Henick              |  "In the long run, men hit only
Web Author At-Large     |  what they aim at.  Therefore,
www.io.com/persist1/    |  though they should fail
persist1 at io.com         |  immediately, they had better aim
persist1_pdx at yahoo.com  |  high."  --Henry David Thoreau

Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.

More information about the thelist mailing list