Problem with javascript
<p>I am using particular JavaScript to check if the value is stored in database... I am getting problem its not showing status as it hang up after loading image. WHile if I use same javascript with other file its working good. Everything thing is alright that is query on other page showalbumstatus.php</p>

<p><strong>JAVASCRIPT</strong></p>

<pre><code>function showalbumstatus(name) {
    document.getElementById("albumstatus").innerHTML = "&lt;img src= photos/loading.gif&gt;";
    xmlHttp = GetXmlHttpObject();
    if (xmlHttp == null) {
        alert("Your browser does not support AJAX!");
        return;
    }
    var url = "showalbumstatus.php";
    url = url + "?";
    url = url + "album=" + name;
    xmlHttp.onreadystatechange = stateChanged;
    xmlHttp.open("GET", url, true);
    xmlHttp.send(null);
}

function stateChanged() {
    if (xmlHttp.readyState == 4) {
        document.getElementById("albumstatus").innerHTML = xmlHttp.responseText;
    }
}
</code></pre>

<p>I am using onblur command on page <code>onblur="showalbumstatus(form1.name.value);"</code></p>

<p>I checked the using JavaScript Console of Chrome exact error is:
<strong>Uncaught TypeError: Cannot set property 'innerHTML' of null
stateChanged</strong></p>
