Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > FormDecorator > Safari 5: Enabled button looks like it is still disabled

Not answered Safari 5: Enabled button looks like it is still disabled

Feed from this thread
  • Shashank avatar

    Posted on Oct 5, 2011 (permalink)

    Hi,

    I am facing the following problem in safari 5.

    1. I have a button which is disabled in design mode
    2. I am enabling this button via javascript.
    3. Though the button gets enabled, the button looks like it is still disabled

    The style used is Office 2007 and the version of telerik used is 2009 or 2010 [not sure].

    Regards,
    Shashank


     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <head runat="server">
        <title></title>
      
        <script type="text/javascript">
            function EnableButton() {
      
                var btn = document.getElementById("btnTarget");
                btn.disabled = false;
            }
            
        </script>
      
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <telerik:RadFormDecorator Skin="Office2007" ID="RadFormDecorator1" DecoratedControls="all"
                runat="server" DecorationZoneID="zoneButtons" />
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <div id="zoneButtons">
                        <asp:Button ID="btnTarget" Text="Target" runat="server" Enabled="false" />
                        <asp:Button runat="server" ID="btnSource" Text="Click to enable 'Target'" Enabled="true"
                            OnClientClick="EnableButton();return false;" />
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        </form>
    </body>
    </html>

     

     

     

     

    Reply

  • Niko Niko admin's avatar

    Posted on Oct 10, 2011 (permalink)

    Hello Shashank,

    Due to browser restrictions and issues some of the core DOM properties cannot be handled correctly when changing. For that you should explicitly call the enable/disable custom method. Here is a sample implementation:
    function EnableButton() { 
        var btn = document.getElementById("btnTarget"); 
        btn.disabled = false;
        Telerik.Web.UI.RadFormDecorator._globalInputDisabled.call(btn, false);
    }

    Hope this helps.

    Regards,
    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

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > FormDecorator > Safari 5: Enabled button looks like it is still disabled
Related resources for "Safari 5: Enabled button looks like it is still disabled"

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