[Javascript] innerHTML trouble with IE 5-mac os 9

Geoff Corriere geoff at cpe1.com
Fri Jun 13 09:26:29 CDT 2003


Hello. I'm new to the list. Searched the archives, but could not find 
this issue.

I am using innerHTML to change the contents of a table cell. It works 
well in Windows and almost all Macs. On IE 5/Mac OS9 there is a 
problem. The new content is supposed to be a new table. But in IE 5/Mac 
OS9 the table does not draw properly. The table gets displayed. Then 
all the contents of the rows get placed underneath the table (on the y 
axis) with all the rows stacking on top of each other (on the z axis).

I have a sample page that shows the problem in IE 5/Mac OS9
http://cpe1.com/jstest/inner_test.html

Here's the code if you prefer

Thanks for the help

Geoff



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
         "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title>Untitled</title>
	<meta name="generator" content="BBEdit 7.0.3">
	<script type="text/javascript" language="Javascript1.1">
	<!--
		function testInnerHTML(){
			
			var join_as_string = "<table border=1 cellpadding=2 cellspacing=0 
 >";		
			join_as_string += "<tr><td>This is the first row of the new 
content</td></tr>";
			join_as_string += "<tr><td>This is the second row of the new 
content</td></tr>";
			join_as_string += "</table>";
			
			//var join_as_string = "new text";
			document.getElementById('new_content').innerHTML = join_as_string;
		}	
	//-->
	</script>
</head>
<body>
<table border="1" cellspacing="0" cellpadding="10" align="left">
	<tr align="left" valign="top">
		<td align="left" valign="top"><a href="javascript: 
testInnerHTML();">Links here determine content in next cell</a></td>
		<td align="left" valign="top"><div id="new_content">This content will 
change</div></td>
	</tr>
</table>
</body>
</html>



More information about the Javascript mailing list