Chrome showing undefined for keyCode
<p>So I have a dropdown list that when the user selects something from the list and presses enter instead of clicking, it is suppose to refresh the page with the selected data.</p>

<p>It is working perfect in IE and Firefox, but Safari &amp; Chrome seem to be completely ignoring it.</p>

<p>Here is where I add the attribute to the dropdown list:</p>

<pre><code>cboContext.Attributes.Add("OnKeyDown", "if (typeAhead(event,'" + cboContext.ClientID + "') == 1) contextPostback();");
</code></pre>

<p>It seems to be ignoring the OnKeyDown attribute in Chrome and Safari</p>

<p><strong>Edit:</strong>   </p>

<p>Based on the work and comments from Sime and Nil,  I have found out that Chrome is not recognizing the keyCode, it shows as undefined.</p>

<p>I have put my typeAhead() code on <a href="http://jsfiddle.net/rcMGP/1/" rel="nofollow">jsFiddle</a></p>

<p>Here is where I declare the variable for keyCode: </p>

<pre><code>var charCode = evt.keyCode || evt.which;
</code></pre>

<p>Does anyone have any idea why it would be staying as undefined?</p>
