JS entity problem
Rojek Piotr <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.java |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
Hi all.
The entity from the code below couse an error and fails to display any
code. But when using the last code everything is OK. How to tell parser
that he is parsing XHTML1.1 code to let him know all its entities?
here's JSConsoleError:
Error: [Exception... "An invalid or illegal string was specified"
code: "12" nsresult: "0x8053000c (NS_ERROR_DOM_SYNTAX_ERR)"
XML Parsing Error: undefined entity
Location:
Line Number 1, Column 501:
here's JS code:
var displayDiv = document.getElementById('displayDiv');
displayDiv.innerHTML = '<p>dfdsfdsfdsf∈</p>';
here's XHTML code
<div id="displayDiv" />
and fallowing JS code works ok:
var displayDiv = document.getElementById('displayDiv');
displayDiv.innerHTML = 'dfdsfdsfdsf∈';
Regards Peter