Combobox - bug with Focus when using selectbox

Using your example 02_combo_init.html

If you go in and change/add the line inmbetween the /***/:

<script>
        var z=dhtmlXComboFromSelect("combo_zone1");

        var z=new dhtmlXCombo("combo_zone2","alfa2",200);
        z.readonly(1)
        z.loadXML("../common/data.xml");
/****************************************************/
	//this line (according to another forum post) should be setting the second combobox on the page to have focus.
        z.DOMelem_input.focus();
/****************************************************/
        var z=new dhtmlXCombo("combo_zone3","alfa3",200);
        z.addOption([[1,1111],[2,2222],[3,3333],[4,4444],[5,5555]]);
</script>

The firstdropdown still gets the focus…

In my own test development page I have 14 items set with tab indexes and I am trying to set the focus of the first element on the screen which is another dhtmlx combobox (have 6 total on the screen) but it won’t set the focus and instead sets the focus to the second one in the list.

Try to set different names to combo objects. And if you are using loading from xml, focus should be set after it:

combo.loadXML(combo,function(){ combo.DOMelem_input.focus(); });

The problem is you have to set focus after all comboboxs have been initialized.

If you set the foxus in the middle to the one you want. Then any one declared after that will set it as focused as well.

Thanks for your help anyway,

Angela