How to set focus on combo box?


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.attachEvent("onOpen", function() {

Try the next:


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!