Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1025
Jquery and webDropDown
posted

Hi,
I'm writing some common javascript code for navigating away from the page.
i wrote the code on window.onbeforeclose() event this code is executed when i click on the webdropdown button
to open the list of items while it should not call this event.
to come over this problem I tryied to set some class on the controls where i dont wnat this event to fire
but the jQuery addClass does not work with infragistic controls and hasClass always returns null
what can i do to identify the controls in jQuery and code accordinglly whatever solution u suggest should be applicable to all the
controls with set and get as i want to set some property and then check it again on Onbeforeclose() event and if the property is set i wount fire that
code. The best solution will be if the dropdown not fire the OnBeforeClose event.

 

 

Parents
No Data
Reply
  • 24671
    posted

    Hey,

    Could you clarify a bit your scenario and what exactly you are trying to achieve ? Are you creating a workaround because some functionality does not work as you expect? The WebDropDown doesn't have an OnBeforeClose event, it only has the following events related to opening and closing -  DropDownOpening and DropDownOpened / DropDownClosing, DropDownClosed.

    If you want to apply a special class to the control itself, you can do that easily with jQuery in the following way:

    $("#DropDownElementID").addClass('someNewClass');

    if you want to apply a class to the dropdown container itself, you can do that

    var dropdownObject = $find("theID");

    $(dropDownObject._elements["DropDown"]).addClass(myClass);

    Hope it helps. If you can answer the above for me, or show me some code snippet,  i will be able to provide you with more help.

    Thank you,

    Angel

     

Children