.innerHTML not working or am I using it wrong?
<p>If I understand right, .innerHTML should overwrite whatever was in a certain div or span.
For example:</p>

<pre><code>&lt;table width="90%" border="0" align="center" cellpadding="5" cellspacing="0"&gt;

  &lt;tr&gt;
    &lt;td colspan="2" align="left"&gt;Via Email:&lt;/td&gt;
    &lt;td width="1070" align="right"&gt;&lt;/td&gt;
  &lt;/tr&gt;

  &lt;script&gt;
  $('#addEmail').click(function()       { 
document.getElementById('emailList').innerHTML = "12345";
  });  
  &lt;/script&gt;

      &lt;span  id="emailList"&gt;
   &lt;tr&gt;
    &lt;td width="27" align="left"&gt;&lt;img src="icon_mail.png" width="24" height="24"&gt;&lt;/td&gt;
    &lt;td width="228" align="left"&gt;123obama@whitehouse.com&lt;/td&gt;
    &lt;td align="right"&gt;&lt;a href="#" id="dialog_link" class="ui-state-default ui-corner-all"&gt;&lt;span class="ui-icon ui-icon-close"&gt;&lt;/span&gt;remove&lt;/a&gt;&lt;/td&gt;
  &lt;/tr&gt;
     &lt;/span&gt;

  &lt;tr&gt;
    &lt;td colspan="3" align="left"&gt;&lt;br&gt;
      &lt;input name="input4" type="text" value="vova@kremlin.ru" size="20"&gt;      &amp;nbsp;&amp;nbsp;
      &lt;a href="#" id="addEmail" class="ui-state-default ui-corner-all"&gt;&lt;span class="ui-icon ui-icon-mail-closed"&gt;&lt;/span&gt;Add Email&lt;/a&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>Therefor upon click of #addEmail button, everything inside  would be removed and replaced by "12345".</p>

<p>Yet in reality it doesn't do anything to that span, but just prints out 12345 in the place, where the script is.</p>

<p>Any ideas what could be wrong?</p>
