This is a migrated thread and some comments may be shown as answers.

Slider events on Opera

1 Answer 25 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Kalyani Mantripragada
Top achievements
Rank 1
Kalyani Mantripragada asked on 16 Mar 2010, 07:36 PM
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

1 Answer, 1 is accepted

Sort by
0
Petio Petkov
Telerik team
answered on 19 Mar 2010, 03:35 PM
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.
Tags
Slider
Asked by
Kalyani Mantripragada
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
Share this question
or