How do I set focus and select text in a combo box?

When users come to my search page, I want to set the combobox as focus and select all the text.

In my regular input boxes I would just add the following to my onLoad event for the page:document.getElementById("Text2").focus(); document.getElementById("Text2").select(); However, this isn’t working with the dhtmlx combo boxes.


you may try to use:


Here combo is the instance of dhtmlxCombo

Thank you. This works great.