Client created Slider isn't active

4 posts, 0 answers
  1. james
    james avatar
    26 posts
    Member since:
    Jan 2007

    Posted 17 Jun 2008 Link to this post


    I was try create slider on client side. But without success. Firefox show error: "h is not a constructor"

    This is my code (this code is wer simillar like Telerik's example):

    function OnPageLoad() 
      responseEnded(null, null); 
    function responseEnded(sender, eventArgs) 
      var sliderProps = { value : 50 } 
      var sliderEvents = {};
      $create(Telerik.Web.UI.RadSlider, sliderProps, null, null, $get("ClientSlider")); 

    Thanks in advance,

  2. Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 20 Jun 2008 Link to this post

    Hello James,

    We tested your code within the following page:

    <form id="form1" runat="server">  
            <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
            <script type="text/javascript">  
            function pageLoad()    
              responseEnded(null, null);    
            function responseEnded(sender, eventArgs)    
              var sliderProps = { value : 50 }    
              var sliderEvents = {};  
              $create(Telerik.Web.UI.RadSlider, sliderProps, null, null, $get("ClientSlider"));      
            <telerik:RadSlider ID="RadSlider1" runat="server" /> 
            <div style="width: 200px; display: none;" class="radslider RadSlider_Default horizontal" 
                <input type="hidden" name="ClientSlider_ClientState" id="RadSlider1_ClientState" 
                    autocomplete="off" value="" /> 

    and it worked as expected - a new RadSlider was created and it was active and had the expected functionality.

    Please, note that the first declared RadSlider is put on the page in order to output the needed scripts and CSS - you do not need it in case you have already output them in another manner.

    Would you please make sure that you have included the client state field, as shown in the above pasted code?

    Best wishes,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft R3 2016 release webinar banner
  4. Laku
    Laku avatar
    7 posts
    Member since:
    Sep 2007

    Posted 09 Mar 2011 Link to this post


    I need to create multiple RadSlider controls on a client side. I am using the exact code from example and it's not working.  I am getting JavaScript error "Error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method." The version of telerik library I am using is 2010.2.713.40. How do I create multiple RadSlider controls on client side with my version of telerik library?

  5. Niko
    Niko avatar
    383 posts

    Posted 14 Mar 2011 Link to this post

    Hello Eric,

    Please, incorporate the following small modification to the sample code: in the style attribute of the div#ClientSlider remove the display:none; rule. If you wish to have this element not displaying before the slider is created, please, have the element appear before the call to the $create method. Also there is a typo in the id attribute of the hidden input - it should be ClientSlider_ClientState.
    Here is a sample of the changed code:
    <div style="width: 200px;" class="radslider RadSlider_Default horizontal" id="ClientSlider"
            <input type="hidden" name="ClientSlider_ClientState" id="ClientSlider_ClientState" autocomplete="off" value="" />

    Best wishes,
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top