Comment

George

The answer to your initial question about how the .firstChild.nodeValue code could have ever worked with the span tag you give is that it will work in Mozilla Firefox (tested on v1.5) if there is a space inside the span tag:

<span id="msg">(space here)</span>

...otherwise Mozilla's JavaScript Console gives the error:

document.getElementById("msg").firstChild has no properties

Unfortunately, adding just a space still gives an error in IE 6 so the true answer is that   needs to be added. Maybe the old code was cleaned up and some spaces or  's were removed? Without something inside the span tag, there's no text node so .firstChild.nodeValue doesn't exist.

PS I hope you don't mind me posting to something this old, but this page places very high for a Google search on ".firstChild.nodeValue" so I thought some more comments might help anyone else who stumbles across it.