<script>window.dhx_globalImgPath = "../../codebase/imgs/";
</script>
<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxcombo.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxcombo.js"></script>
<table>
<tr>
<td>
<div id="combo_zone2" style="width:250px; height:30px;"></div>
</td>
</tr>
<tr>
<td>
<div id="logarea" style="background-color:lightgrey;height:218px;width:250px; overflow:auto"></div>
</td>
</tr>
</table>
<script>var combo = new dhtmlXCombo("combo_zone2", "alfa2", 250);
combo.loadXML("../common/data.xml");
function doLog(str) {
var log = document.getElementById("logarea");
log.innerHTML = log.innerHTML + str + "<br/>";
log.scrollTop = log.scrollHeight;
}
combo.attachEvent("onChange", onChangeFunc);
combo.attachEvent("onKeyPressed", onKeyPressedFunc);
combo.attachEvent("onSelectionChange", onSelectionChangeFunc);
combo.attachEvent("onBlur", onBlurFunc);
function onChangeFunc() {
doLog("" + 'onChange' + " event has occured");
return true;
}
function onKeyPressedFunc(key) {
doLog("Key " + key + " was pressed");
return true;
}
function onSelectionChangeFunc() {
doLog("Selection was changed");
return true;
}
function onBlurFunc() {
doLog("" + 'onBlur' + " event has occured");
return true;
}
</script>