Dynamic HTML bug in Mac MSIE5?

by Rob Seiler <seiler(at)gippsnet.com.au>

 Date:  Fri, 23 Jun 2000 00:10:10 +1000
 To:  hwg-languages(at)hwg.org
  todo: View Thread, Original
Any Mac users out there ??

Below is a short dynamic HTML page which I think illustrates a bug in the
Mac version of MSIE ver 5. I don't have a Mac so would greatly appreciate
someone so endowed testing this code.

A table written dynamically to a <DIV> in a page is not properly formed
unless the table code is followed by one or more extra characters. In a
brief test of "bad table" on a friends Mac the actual content of the 2
table cells was "piled" in a single line outside (below) the table.

<HTML><HEAD>
<SCRIPT LANGUAGE="JavaScript">
function maketable(n) {
  var t =  '<TABLE BORDER=4><TR><TD>This is cell 1</TD></TR>';
       t += '<TR><TD>THIS IS CELL 2</TD></TR></TABLE>';
  if (n) {t += 'The above table should display OK'};
  displaytable.innerHTML = t;
}
</SCRIPT>
</HEAD>
<BODY>

<P onClick="maketable(1)">Click to see good table</P>
<P onClick="maketable(0)">Click to see bad table</P>

<DIV ID=displaytable></DIV>
</BODY>
</HTML>
 

Best regards,
Rob Seiler
Extra Language Resources
"Speech and Language Resources for the World"

... Web: http://www.elr.com.au
... e-mail: support(at)elr.com.au
... voice: +61 (3) 5156 8309
... fax: +61 (3) 5156 8609

ELR Software Pty Ltd
PO Box 1456
Bairnsdale VIC 3875
Australia

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA