I created a custom web user control simply with a drop down box and an image.
I have a javascript on the user control to capture the click on the image and automatically fire off the drop down box (similar to your TimePicker)
Very simple.....
I have placed 2 of the user controls on my page.
My problem is when I click on either of the images, the focus goes to the last instance of the drop down box.
I looked at the generated code and it appears that the script is in there both times and since the script is named the same, the last definition overwrites any earlier versions.
How do I uniquely define the script so that the click knows which drop down to get focus?
Also I'd like to fire the drop down instead of just focus...which event do I use?
Thanks
Greg
I have a javascript on the user control to capture the click on the image and automatically fire off the drop down box (similar to your TimePicker)
Very simple.....
<
script language="javascript" type="text/javascript">
function SetFocus() {
var comboBox = $find("<%=cboTime.ClientID %>");
var input = comboBox.get_inputDomElement();
input.focus();
}
</
script>
<
telerik:RadComboBox ID="cboTime" Runat="server" Width="100px" AllowCustomText="true">
</
telerik:RadComboBox> <a href="JavaScript:SetFocus()"><asp:Image id = "imgClock" alt="Time" style="height:15; width:15;" runat="server" /></a>
I have placed 2 of the user controls on my page.
My problem is when I click on either of the images, the focus goes to the last instance of the drop down box.
I looked at the generated code and it appears that the script is in there both times and since the script is named the same, the last definition overwrites any earlier versions.
How do I uniquely define the script so that the click knows which drop down to get focus?
Also I'd like to fire the drop down instead of just focus...which event do I use?
Thanks
Greg