How to set focus on combo box?

Hi,

I’m trying to set focus on a combo box so that the cursor is positioned in it when the combo box is instantiated. Here is my code … it all works except for the last line. I tried using the JavaScript focus() method, but it doesn’t seem to work here. Any help you might offer would be appreciated! Thanks.

	var myCombo = new dhtmlXCombo("combo_zone", "idname", 300);
	myCombo.enableFilteringMode("between");
	myCombo.loadXML("GetDirectionsList.xml");
	myCombo.attachEvent("onOpen", function() {
		myCombo.focus();
	})

Try the next:

myCombo.DOMelem_input.focus();

Thanks, Darya. Your suggested code worked once I moved it from the onOpen function and placed it instead right after the loadXML function.

Really appreciate your help! Thanks again.

You are welcome!