get_value ok in IE not in Chrome & Firefox

3 posts, 1 answers
  1. Herve
    Herve avatar
    39 posts
    Member since:
    Jun 2008

    Posted 04 Nov 2012 Link to this post


    The following function is working fine in IE but the sliders are not displayed in Chrome or Firefox.

    If I replace "var MyAmount = slider1.get_value();" by "var MyAmount = "1000" and the same for "var MyDuration" all is perfect.
    Is it a known issue ?

    Any idea about how to fix that problem to make it works in all the browsers ?

    Thanks for your support ...


    function RefundRange() {

            var slider1 = $find('<%= RsAmount.ClientID %>');
            var MyAmount = slider1.get_value();

            var slider2 = $find('<%= RsDuration.ClientID %>');
            var MyDuration = slider2.get_value();
            var MiniRefund = Math.round((((MyAmount * 7) / 100) + MyAmount) / MyDuration);
            var MaxiRefund = Math.round((((MyAmount * 14) / 100) + MyAmount) / MyDuration);

            SpanMiniRefund.innerHTML = "CHF " + MiniRefund + ".-";
            SpanMaxiRefund.innerHTML = "CHF " + MaxiRefund + ".-";

  2. Answer
    Slav avatar
    1355 posts

    Posted 06 Nov 2012 Link to this post

    Hello Herve,

    Possible problems that could occur when using the code you posted are:
    • The value of MyDuration is zero which results in division by zero. You should check for this case, if you have not done this already.
    • You are calling the function RefundRange before the client-side objects of the RadSliders are created. Sys.Application.load Event is the earliest event in which is recommended to call your function.

    The sliders not being displayed suggest a JavaScript error that prevents their client-side objects from being created, however I cannot determine the exact cause for this from your sample. I need to examine the setup of the sliders, as well as the script in which you call the function RefundRange in order to provide a more to the point answer. A simple, runnable project that isolates the problem will be useful for inspecting it locally. You can send it by opening a regular support ticket.

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Herve
    Herve avatar
    39 posts
    Member since:
    Jun 2008

    Posted 06 Nov 2012 Link to this post


    Thanks for your reply.

    I was tried to make a little sample site as per suggested and all is working in all the browser when I'm not using a master page.

    I'm sending the whole project because I'm not able to reproduce it.

    Best regards,

Back to Top