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
85
div input components not supporting onfocus / onblur?
posted

Hello,

thanks to the fact that IE7 chooses to ignore the :focus pseudoclass I have to use onfocus and onblur events to change the look of the input fields. Now it seems that for example the ig:dropDownList does not even support those events?

Is there any other easy way to catch the focus / blur on those fields?

Thanks in advance

 

/anja 

  • 12025
    posted

    Hello Anja,

    Currently we do not expose any client-side events directly off of our controls. You can, upto a certain extent, get the control in javascript and hook these events manually on body load. However, we are working on exposing these client-side events for our controls in future.

     So, in case of a drop down list, you can do the following:

    //"mainForm" is the Forms ID and "myDropDownList" is the drop down list's id

    var ddl = document.getElementById("mainForm:myDropDownList");

     

    ddl.onfocus = ddlFocus;

    ddl.onblur = ddlBlur;

    function ddlFocus() { alert('DDL Focus'); }

    function ddlBlur() { alert('DDL Blur'); }

    Hope this helps.  

    -Taz.