getElementById issue
<p>I have got this button:</p>

<pre><code>&lt;input type="button" value="Rep" 
    id="rep" name="rep" class="rep" style="width:50px" 
    onclick="triggerLabel(1);this.disabled=true;addRep(&lt;?php echo  $comment_id; ?&gt;);"/&gt;

&lt;script type="text/javascript"&gt;

     function triggerLabel($commentID)
     {
        var $theID="#"+$commentID;
        var $label=document.getElementById($theID).value;
        alert($label);
     }

&lt;/script&gt;
</code></pre>

<p>The alert isn't triggered. I want to obtain the commentID and convert it to a string.. And I want that string to represent my element ID. The alert works, it retrieves #25. That's the id that I gave one of my labels..</p>

<pre><code>echo '&lt;label id="'.$comment_id.'"&gt;'.$avatarRep.'&lt;/label&gt;';
</code></pre>

<p>It should retrieve that label, but unfortunately it fails..I get this:</p>

<blockquote>
  <p>Error: document.getElementById($theID) is null
  Source File: <a href="http://localhost/PoliticalForum/Thread/thread.php?threadID=15&amp;page=1" rel="nofollow">http://localhost/PoliticalForum/Thread/thread.php?threadID=15&amp;page=1</a>
  Line: 246</p>
</blockquote>

<p>What do I do?</p>

<p>That's how the label html control looks like when I view the source page:</p>

<pre><code>&lt;label id="25"&gt;6&lt;/label&gt;
</code></pre>

<p>UPDATE:
I updated my answer. Take a look:</p>

<pre><code>var $label=document.getElementById($commentID);
$label.value=9999;
</code></pre>

<p>The 9999 isnt inserted into the table..why?!?</p>

<p>UPDATE 2:
This doesnt work:</p>

<pre><code>document.getElementById($commentID).value="88888";
</code></pre>

<p>The label isnt changed.</p>
