Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Dino on Dec 14, 2007 01:54
open dhtmlx forum
dhtmlx combo event

First of all many thanks for your great JS components.
It seems that event handlers do not work with combo generated from html.
In the following example there are two combo: event on combo_zone1 does not work, event on combo_zone2 works gracefully.
Any help is really appreciated,
thanks,
Dino
--
<select id="combo_zone1" name="alfa1" style="width:200px; height:30px;">
<option value="1">a0000112</option>
<option value="2">a0000113</option>
<option value="3">a0000114</option>
</select>
<br>
<div id="combo_zone2" style="width:200px; height:30px;"></div>
<script>
////////////
var z=new dhtmlXCombo("combo_zone1","alfa1",200, 'image');
z.attachEvent("onKeyPressed",function(event){alert('yyyyyyy');})
////////////////
var zz=new dhtmlXCombo("combo_zone2","alfa2",200, 'image');
zz.loadXML("data.xml");
zz.attachEvent("onKeyPressed",function(event){alert('xxxxxxx');})
//////////
</script>
Answer posted by Support on Dec 14, 2007 05:08
Problem confirmed and fixed.
You can
a) use dhtmlXComboFromSelect - which works correctly.
or
b) use attached js file instead of original one.
Attachments (1)