Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > FormDecorator > OnChange event of Decorated SELECT does not fire

Not answered OnChange event of Decorated SELECT does not fire

Feed from this thread
  • Tele avatar

    Posted on Apr 15, 2011 (permalink)

    Hello,

    I have a <select id='selectid'> element that has the "change" event bound
    using $('#selectid').bind('change', select_Changed) or $('#selectid').change(select_Changed).
    The event is fired correctly.

    This control is client side only. It does not have a server id and is not sent through posts.

    As soon as the form is decorated by the Telerik FormDecorator the bound event are
    not fired anymore.

    The original HTML is

    <SELECT id=selectid>
        <OPTION selected>--</OPTION>
        <OPTION value=1>1. first</OPTION>
        <OPTION value=2>2. second</OPTION>
    </SELECT>


    The decorated HTML is :

    <A style="WIDTH: 212px; cssFloat: undefined" id=Skinnedselectid class="rfdSelect rfdSelect_TheSkin" href="javascript:void(0)" unselectable="on" forSelect="selectid">
        <SPAN class=rfdSelectOuter>
            <SPAN class=rfdSelectText>--</SPAN>
        </SPAN>
    </A>
    <SELECT id=selectid class=rfdRealInput _rfddecoratedID="Skinnedselectid" jQuery15104498465490814524="3">
        <OPTION selected>--</OPTION>
        <OPTION value=1>1. first</OPTION>
        <OPTION value=2>2. second</OPTION>
    </SELECT>

    How can I get my events to be fired ?
    Thanks for your help.

    Reply

  • Niko Niko admin's avatar

    Posted on Apr 15, 2011 (permalink)

    Hi,

    This is a very interesting case of event handling. The jQuery library handles specific events in a special way, probably trying to escape certain scenarios. The change event, being one of them, is not handled in the traditional way. The FormDecorator attempts to fire this event, however, in IE if the event hasn't been attached the firing doesn't take place.
    To work around this issue I advice you to use the Ajax Toolkit method for attaching event handlers, i.e. $addHandler. Using this method allows the FormDecorator to fire the event handlers correctly.

    Hope this helps.

    Greetings,
    Niko
    the Telerik team
    Explore the entire set of ASP.NET AJAX controls we offer here and browse the myriad online demos to learn more about the components and the features they incorporate.

    Reply

  • Tele avatar

    Posted on Apr 18, 2011 (permalink)

    Thanks for your reply. The $addHandler worked fine.

    Reply

  • Tele avatar

    Posted on Feb 2, 2012 (permalink)

    Hello,

    Back again to the same problem. The addHandler trick work in any browser but IE9....
    Do you have a solution for IE9 ?
    Thanks for your reply.

    Reply

  • Niko Niko admin's avatar

    Posted on Feb 2, 2012 (permalink)

    Hi Tele,

    The change event seems to be working just fine in IE9 on my side. Please, check this video to see it for yourself. If you still experience issues, you best option is to open a support ticket and attach a sample runnable project there that demonstrates the issue at hand.

    All the best,
    Niko
    the Telerik team
    Explore the entire set of ASP.NET AJAX controls we offer here and browse the myriad online demos to learn more about the components and the features they incorporate.

    Reply

  • LevizArc avatar

    Posted on Feb 2, 2012 (permalink)

    Hi,

    I do agree with you : it is working in IE9.

    Still, I had to upgrade to latest Telerik.Web.UI.dll (2011.3.1305) to make it work,
    because, Telerik.Web.UI.dll (2011.2.915) had the issue,

    Thanks for your help
    Regards

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > FormDecorator > OnChange event of Decorated SELECT does not fire
Related resources for "OnChange event of Decorated SELECT does not fire"

ASP.NET FormDecorator Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]