Posts

Showing posts with the label dropdown

Adding javascript hover event for items in an ASP.NET dropdownlist tied to a CascadingDropDown

I recently had a user ask if I could load some information onto a page in our application when he hovered over an item in an ASP.NET dropdownlist. To complicate matters, the dropdownlist was grouped with two others controlled by a CascadingDropDown control from the MS AjaxControlToolkit. So, the items in the dropdownlists were databound from the client-side. Though I'm not completely happy with it, I did manage to get something going and decided it may be useful to someone else. First, here's the definition for my dropdownlist. Second, I defined a method to handle the dropdownlist's "populated" event (Remember, it is populated client-side by the CascadingDropDown control). It loops through each of the items in the dropdownlist & assigns each an onmouseover event. function pageLoad() { $find("QuicklistWorkorders").add_populated(OnWorkordersPopulated); } function OnWorkordersPopulated() { var ddl = document.getElementById(" ...