title: Javascript onkeyup function not working
body: <p>Don't know whats exactly going on, but it's definitely killing my time for nothing. Here's my javascript function :</p>
  
  <pre><code>&lt;script type="text/javascript"  &gt;
  
  function loadSponsorName() {
      var sp_id = document.getElementById('sponsor_id').value;
      var murl = 'load_sponsor.php?sp_id='+sp_id+'';
  
      var a=new Ajax(murl,{
          method:"post",
          onComplete: function(response){
          $('sponsorName').setHTML(response); 
          }
      }).request();
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>and inside a form this are my inputs</p>
  
  <pre><code>&lt;tr&gt;
      &lt;td width="33%" height="20"&gt;
          &lt;label id="namemsg" for="name"&gt;Sponsor ID:&lt;/label&gt;
      &lt;/td&gt;                          
      &lt;td width="67%"&gt;
          &lt;input type="text" name="sponsor_id" id="sponsor_id" size="40" value="" class="inputbox required" maxlength="50" onkeyup="loadSponsorName();" /&gt; *
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
      &lt;td height="20"&gt;
          &lt;label id="namemsg" for="name"&gt;Sponsor Name:&lt;/label&gt;
      &lt;/td&gt;                          
      &lt;td&gt;&lt;div id="sponsorName"&gt;
          &lt;input type="text" name="sponsor_name" id="sponsor_name" size="40" value="" class="inputbox required" maxlength="50" /&gt; *
      &lt;/div&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>It seems the onkeyup event is not even calling the function.</p>
  
  <p>Can somebody help me?</p>