I am trying to emulate a simple timepick user control with a combo box and a little image of a clock. In the user control I type in the code:
function SetFocus() {
var comboBox = $find("<%=cboTime.ClientID %>");
var input = comboBox.get_inputDomElement();
input.focus(); }
cboTime is the combobox control and there is an image of a little clock right after I tie the click event of the image to this function
all is fine and dandy if I have ONE user control on my page.....
If I add another user control with a different name, the behavior is such that no matter which image I click, the very last combo box gets the focus.
I know WHAT is happening...I just need a workaround. When the page is rendered, it creates two identical scripts with the client id of the combo box. Problem is, all the preceding instances overwrites the predecessor because they are the same name.
Anyone got a solution to this? Its gotta be simple but I can't find the answer anywhere.
Thanks