locked
Change Maximum and value of MultiHandleSliderExtended using javascript RRS feed

  • Question

  • User1483957885 posted

    I neeed to change maximum value for MultiHandleSliderExtended using javascript.
    Here is my ASP.NET code:
     

               <asp:TextBox Style="display:none" ID="ACTPriceBox" runat="server"></asp:TextBox>
                            
               <asp:TextBox Style="display:block" ID="ACTMinPriceValue" Text="0" runat="server">0</asp:TextBox>
               <asp:TextBox Style="display:block"  ID="ACTMaxPriceValue" Text="100" runat="server">100</asp:TextBox>
    
               <cc1:MultiHandleSliderExtender runat="server" ID="ACTSliderExtender1"
                                EnableHandleAnimation="true"
                                BehaviorID="ACTSliderExtender1"
                                TargetControlID="ACTPriceBox"
                                Length="185"
                                Minimum="0" 
                                Maximum="100" 
                                HandleCssClass="slider-handle" 
                                RailCssClass="slider-rail"
                                EnableViewState="false"
                                OnClientValueChanged="SetPrice">
               <MultiHandleSliderTargets>
                    <cc1:MultiHandleSliderTarget ControlID="ACTMinPriceValue"  HandleCssClass="slider-handle"/>
                    <cc1:MultiHandleSliderTarget ControlID="ACTMaxPriceValue"  HandleCssClass="slider-handle"/>
               </MultiHandleSliderTargets>
                                
       </cc1:MultiHandleSliderExtender>


    I founded some examples here that can change value of Sliderextender, but IT IS  NOT WORKING ON MultiHandleSliderextender! :(
    I need javasript function to change maximum for MultiHandleSliderExtender, and set value of right handle to maximum value.

    Can it be done?

    I founded theese examples on forum

    $find("ACTSliderExtender1").set_Maximum(100);
    $find("ACTSliderExtender1").set_Value(100);

    Above is the solution I founded to change maximum using javascript for SliderExtender, not MultiHandleSliderExtender, althought it should be the same, it is not working.

    Anybody can help me with this?

    Sunday, November 15, 2009 10:15 AM

Answers

  • User1483957885 posted

    Yes!!! That did the trick! Smile

    Thank you!!!

    Now, after I set Maximum for MultiHandleSliderExtender, I incidentally founded all javascript functions I needed to manage Slider on client side.
    IE8 has a javascript debugger, that exposed all functions I needed.

    So, here is complete scenario for setting maximum for MultiHanldeSliderExtender and values of its handles.

    To set maximum for multi slider:

    $find("ACTSliderExtender1").set_maximum(<VALUE GOES HERE>);


    To set values for left and right handle, use function "setValue(index, value)"

    // For first handle (left one) use this
    $find("ACTSliderExtender1").setValue(0, <VALUE GOES HERE>);
    // For right handle use this code
    $find("ACTSliderExtender1").setValue(1, <VALUE GOES HERE>);

    So, that was all I needed.

    Thank you for your reply!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 16, 2009 9:08 AM

All replies

  • User-1360095595 posted

    I checked the extender's code.  Try your luck with: set_maximum() instead. 

    Sunday, November 15, 2009 9:41 PM
  • User1483957885 posted

    Yes!!! That did the trick! Smile

    Thank you!!!

    Now, after I set Maximum for MultiHandleSliderExtender, I incidentally founded all javascript functions I needed to manage Slider on client side.
    IE8 has a javascript debugger, that exposed all functions I needed.

    So, here is complete scenario for setting maximum for MultiHanldeSliderExtender and values of its handles.

    To set maximum for multi slider:

    $find("ACTSliderExtender1").set_maximum(<VALUE GOES HERE>);


    To set values for left and right handle, use function "setValue(index, value)"

    // For first handle (left one) use this
    $find("ACTSliderExtender1").setValue(0, <VALUE GOES HERE>);
    // For right handle use this code
    $find("ACTSliderExtender1").setValue(1, <VALUE GOES HERE>);

    So, that was all I needed.

    Thank you for your reply!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 16, 2009 9:08 AM