Javascript: Changing src not working
<p>I'm calling a function like this:</p>

<pre><code>&lt;img src="/images/icons/info.png"
width="18" height="18" class="iconbutton" alt="Add to Library" 
onclick="AddLibrary(12345,this.id); this.onclick=null;" /&gt;
</code></pre>

<p>The function then POSTS 12345 to another script and then is supposed to change the icon image:</p>

<pre><code>function AddLibrary(pibnval,thisid) {
    $.post('/addlibrary.php', {
        pibn: pibnval
    }, function() {
    thisid.setAttribute('src', "/images/icons/tick.png");
    });
};
</code></pre>

<p>The POST works great, but the image does not change.</p>

<p>I also tried:
<code>document.getElementById(thisid).src = "/images/icons/tick.png";</code>
but that didn't work either.</p>

<p>Any ideas?</p>
