Im not trying to capture if a user clicked enter or not. What I am trying to do is send an enter key in javascript.
I have an asp.net textbox:
<asp:TextBox id="myBox" runat="server" OnChange="SendEnter" />
On any key press in this text box I want it to call a client side function called "SendEnter".
In send enter I want to send the enter keystroke (this is not to submit a form but to fire the server side OnChanged event of the asp.net textbox).
Can I do something like:
function SendEnter() {
var theKey = 13; //enter key?
document.trigger(13); //not sure if this even exists
}