title: My java script function to disable the enter key is not working
body: <p>When I am calling the java script from my VB code as </p>
  
  <pre><code>oCell.InnerHtml += "&lt;input type='submit' id='btnOK' value='" &amp; Phrasebook.Text("Button_OK") &amp; "' onclick='helpCommit();' onkeyup='disableEnterKey(event);'/&gt;"
  </code></pre>
  
  <p>its not working.</p>
  
  <p>My Javascript function is</p>
  
  <pre><code>function disableEnterKey(event)
      {
          var key= window.event.keyCode;
  
          if(key == 13)
          {
              e.preventDefault();
              return false;
          }
      }
  </code></pre>