Slider events on Opera

2 posts, 0 answers
  1. Kalyani Mantripragada
    Kalyani Mantripragada avatar
    10 posts
    Member since:
    Jan 2010

    Posted 16 Mar 2010 Link to this post

    Hi, I have a problem with slider events not working on Opera browser.

    1. PageLoad event is not being recognized by Opera. Here is my code.
    function pageLoad(sender, args) {  
           var status = Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();  
           if (!status) {  
               HidePanels();  
           }  


    2. None of the get/set methods are working in Opera.
    Ex:
    slider.get_isSelectionRangeEnabled()  
     
    slider.set_selectionStart(newValue);  
     
    slider.set_selectionEnd  
     
     


    Any help is appreciated.

    thanks
  2. Petio Petkov
    Admin
    Petio Petkov avatar
    825 posts

    Posted 19 Mar 2010 Link to this post

    Hello Kalyani Mantripragada,

    I tested the following code and it works under latest Opera version(10.50):
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      
    <head runat="server">
        <title></title>
        <script type="text/javascript">
            function pageLoad(sender, args) {
                alert("pageLoad");
                var status = Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();
                if (!status) {
                    alert("status is" + status);
                }  
            }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <asp:Button ID="btnPostback" Text="Postback" runat="server" />
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        </form>
    </body>
    </html>
    My suggestion is to use AJAX's Client Life-Cycle Events. More about them is available here: http://msdn.microsoft.com/en-us/library/bb386417.aspx

    I was also unable to find a problem related to the RadSlider's methods. Here is the code which I tested under Opera 10.50:
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <script type="text/javascript">
            function MyPageLoad() {
                var slider1 = $find("RadSlider1");
                alert("slider1 isSelectionRangeEnabled:" + slider1.get_isSelectionRangeEnabled());
                  
                var slider2 = $find("RadSlider2");
                alert("slider2 isSelectionRangeEnabled:" + slider2.get_isSelectionRangeEnabled());
                var selectionStart = slider2.get_selectionStart();
                var selectionEnd = slider2.get_selectionEnd();
                alert("slider2 selectionStart is:" + selectionStart + ";selectionEnd is:" + selectionEnd);
                //Set new values;
                slider2.set_selectionStart(4);
                slider2.set_selectionEnd(6);
                selectionStart = slider2.get_selectionStart();
                selectionEnd = slider2.get_selectionEnd();
                alert("slider2 new selectionStart is:" + selectionStart + ";new selectionEnd is:" + selectionEnd);
            }
            Sys.Application.add_load(MyPageLoad);
        </script>
        <div>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <asp:Button ID="btnPostback" Text="Postback" runat="server" />
                    <telerik:RadSlider ID="RadSlider1" runat="server" IsSelectionRangeEnabled="false" Value="0" 
                    MinimumValue="0" MaximumValue="10"></telerik:RadSlider>
                    <telerik:RadSlider ID="RadSlider2" runat="server" IsSelectionRangeEnabled="true"
                     MinimumValue="0" MaximumValue="10"
                     SelectionStart="0" SelectionEnd="10">
                     </telerik:RadSlider>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        </form>
    </body>
    </html>
    I tested them at our RadSlider's Client-Side API online example and everything is working fine. Could you please tell me whether I am missing something?


    All the best,
    Petio Petkov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top