Automatically creates a Javascript handle for all onenter events the same way browsers natively support onclick, onblur, etc.


OnEnter requires the jQuery library. Please download the jQuery library and include it in the <head></head> of your html page.

Easy Implementation

OnEnter is automatically enabled when the Javascript file is included. Simply add the attribute "onenter" to any element, and it will be execute like any other Javascript event.

<input type="text" id="first_name" name="first_name" onenter="someFunction('var1','var2');" />

Dynamic Content Support

OnEnter supports fields that are generated dynamically from Javascript or AJAX calls. Simply execute OnEnter.detect(); and OnEnter will re-parse the DOM.

<input type="button" onclick="loadDynamicField();" value="Load Dynamic Field" />
<div id="dynamic"></div>
<script type="text/javascript" language="javascript">
function loadDynamicField(){
	var div = document.getElementById('dynamic');
	div.innerHTML = "Dynamic Field: <input type='text' onenter='alert(\"Dynamic fields work.\");' />";