Categories | Question details Back To List | ||
DHTMLXCOMBO blur event not firing <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>For demo purpose only :: &1</title> <script> window.dhx_globalImgPath="./codebase/imgs/"; function submitMe() { document.form1.submit(); alert("submitted"); } </script> <link rel='STYLESHEET' type='text/css' href='codebase/dhtmlxcombo.css'> <script src='codebase/dhtmlxcommon.js'></script> <script src='codebase/dhtmlxcombo.js'></script> </head> <body> <h1>Filtering and Autocomplete</h1> <p>Filtering and Autocomplete are enabled for combo<br/> Try to print in the input field - the option box will present a list of suggestions. Autocomplete will complete the input based upon the characters entered.</p> <form name="form1"> <h3>From select box</h3> <select style='width:200px;' id="combo_zone1" name="alfa1" onblur="submitMe()"> <option value="1">a01</option> <option value="2">a01</option> <option value="3">a02</option> <option value="4">a10</option> <option value="5">a11</option> <option value="6">a12</option> <option value="7">b00</option> <option value="8">b01</option> <option value="9">b02</option> <option value="10">b10</option> <option value="11">b11</option> <option value="12">b12</option> <option value="13">a22</option> <option value="14">a31</option> <option value="15">a04</option> </select> <br> </form> <script> var z=dhtmlXComboFromSelect("combo_zone1"); z.enableFilteringMode(true); dhtmlxEvent(z.DOMelem,"click",function(){ z._last=(new Date()).valueOf(); }) z.attachEvent("onOpen",function(){ window.setTimeout(function(){ if ((new Date()).valueOf()-(z._last||0) > 100) return; var text = z.getComboText(); z.setComboText("") z.filterSelf(); z.setComboText(text); },1); }) </script> </body> </html> Answer posted by Support on Jan 28, 2009 06:27 Native onblur event not moved to the created combo, you can attach it directly as z.attachEvent("onBlur",function(){ alert("blur"); }); |