Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Luigi Rosito on Jun 06, 2008 08:29
open dhtmlx forum
If I use dhtmlXComboFromSelect () of dhtmlxcombo.js lose the visibility of select object in the html page???

Hi,
in a jsp page, i have this code:

<html:select property="X" styleId="X">
<html:option value=""></html:option>
<html:options collection="listaAA" property="anno_acc_studio" labelProperty="anno_acc_studio"/>
</html:select>
<script>
var z=dhtmlXComboFromSelect("aaU");
z.enableFilteringMode(true);
</script>

Now, in the html page I don't see the select object. Why?
If I write in the javascript code

document.getElementById(IdSelect);

the result is null, but if I delete the script

<script>
var z=dhtmlXComboFromSelect("aaU");
z.enableFilteringMode(true);
</script>

the result is [object]

Why???

Best Regards
Luigi

Answer posted by Support on Jun 06, 2008 10:05
>>Now, in the html page I don't see the select object. Why?
if used ID is correct - the select box element must be replaced with dhtmlxcombo

>>the result is null
When converted to combo, original select box removed from DOM and not accessible to script anymore. So the situation , when you can't locate original select by getElementById is correct.