JS/JQ simulate Enter event
THX to the awesome Eran Hertz our programming Architect! thing is that the trigger event needs some extra stuff to trigger the right thing: var press = jQuery.Event( "keypress" ); press.altGraphKey = false ; press.altKey = false ; press.bubbles = true ; press.cancelBubble = false ; press.cancelable = true ; press.charCode = 13; press.clipboardData = undefined; press.ctrlKey = false ; press.currentTarget = $( "#myTextBox" )[0]; press.defaultPrevented = false ; press.detail = 0; press.eventPhase = 2; press.keyCode = 13; press.keyIdentifier = "" ; press.keyLocation = 0; press.layerX = 0; press.layerY = 0; press.metaKey = false ; press.pageX = 0; press.pageY = 0; press.returnValue = true ; press.shiftKey = false ; press.srcElement = $( "#myTextBox" )[0]; press.target = $( "#myTextBox" )[0]; press.type = "keypress" ; press.view = Window; press.which = 13; $( "#myTextBox" ).trigger(press