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

Muchacho, Laurent (TWIi London) LMuchacho at twii.net
Fri Jun 13 10:41:46 CDT 2003


Hi Geoff

I had a strange bug like that one when I did some stuff once The things how
fixit for me was a \n at the end of the string 

Laurent

I put the \n just at the end of your string join_as_string

<!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>\n";
			
			//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>




-----Original Message-----
From: Geoff Corriere [mailto:geoff at cpe1.com]
Sent: 13 June 2003 15:26
To: javascript at LaTech.edu
Subject: [Javascript] innerHTML trouble with IE 5-mac os 9


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>

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript


DISCLAIMER - The preceding e-mail message (including any attachments)
contains information that may be confidential, may be protected by the
attorney-client or other applicable privileges, or may constitute non-public
information.  It is intended to be conveyed only to the designated
recipient(s) named above.  If you are not an intended recipient of this
message, or have otherwise received it in error, please notify the sender by
replying to this message and then delete all copies of it from your computer
system.  Any use, dissemination, distribution, or reproduction of this
message by unintended recipients is not authorized and may be unlawful. The
contents of this communication do not necessarily represent the views of
this company.


More information about the Javascript mailing list