there is a " too many and the error makes no sense without the context (there are elements, that don’t allow tables inside, but we don’t know, which of these you used or if it is something else)

JohnBoy007_2006

05-07-2010, 08:29 AM

So then s it because innerHTML does not allow tables?

document.getElementById('type').innerHTML = content;

abduraooft

05-07-2010, 08:42 AM

Moving your javascript to an external file of adding CDATA comments around the code would fix it. Read http://javascript.about.com/library/blxhtml.htm

Dormilich

05-07-2010, 08:48 AM

Moving your javascript to an external file of adding CDATA comments around the code would fix it.
CDATA is an "invalid" tag in HTML (it would be required in served XHTML, which practically no-one does) and is ignored by HTML parsers, besides it would not make any sense in an external file. a commented comment tag (// <!--, // -->) would suffice, but all recent browsers can differentiate between JavaScript code and HTML tags.

So then s it because innerHTML does not allow tables?
<script> does not allow tables, but I think that’s due to the " problem.