title: Spacebar key press on anchor html element doesn't trigger click event. How to let this happen?
body: <pre><code>&lt;a tabindex="7" style="cursor: pointer;" class="button" id="saveTocAddNew" onClick="saveTdsAddNew();"/&gt;&lt;span&gt;Save &amp; Add Another&lt;/span&gt;&lt;/a&gt;
  </code></pre>
  
  <p>I have the above anchor element in my page. This one is styled to look like a button and so will be treated as a button. The problem is as follows. The user doesn't want to use mouse to click on it or reach it, but he will use the tabbing to highlight this anchor element and then will use "spacebar" or "return" keys to click on it. If the user hits on spacebar or return key I should be able to call a JavaScript function. I tried the onkeypress event and that doesn't help. Any idea?</p>