I have a very simple function which I cannot figure out.
Here's the JS
----
function replaceHeading() {
var heading = document.getElementById("initial_heading");
alert(heading.nodeName);
}
----
and here's the relevant HTML
----
<div id="content">
<h1 id="initial_heading" class="specialh1">[xyz page]</h1>
<p><img id="temp" src="images/zone.jpg" alt="Zone sign" width="400" height="267" /></p>
<h1 class="specialh1"><a href="index.html">[.com]</a></h1>
</div>
----
shouldn't alert(heading.nodeName) return h1? I get no JS message at all when I load the page.



Reply With Quote




Bookmarks