i've read that innerHTML is not in the W3C standards and never will be.
however i've found something that i simply can't do by manipulating
text nodes directly.
<div id="mydiv"></div>
<script type="text/javascript">
document.getElementById('mydiv').innerHTML='ide&ea cute; fixe';
</script>
this prints "idee fixe" with the final 'e' of idee having an acute
accent (the é entity).
however if i use this javascript instead:
var newNode = document.createTextNode("ideé fixe");
var oldNode = document.getElementById('mydiv').firstChild;
var removedNode = document.getElementById('mydiv').replaceChild(newN ode, oldNode);
this does not display an accented e. it displays the literal string & e a c u t e ;
(spaces inserted so your newsreader won't transform it)
personally i don't have any problems with innerHTML, despite it not being a
standard. however, i'd like to know for my own curiosity if there's a way
to get the innerHTML behavior with the DOM-approved node manipulation commands.
-rs-