Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6576539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:31:29+00:00 2026-05-25T15:31:29+00:00

using the jquery below I’m trying to submit the array paramlist to the appropriate

  • 0

using the jquery below I’m trying to submit the array paramlist to the appropriate web method below. What am I missing here?

 <script type="text/javascript">
        $(document).ready(function () {

            var slider = $('.slider').slider({
                range: "min",
                min: 0,
                max: 100,
                change: function (e, ui) {

                    var paramList = new Array();

                    var values = $('.slider').each(function () {
                        var s = $(this);
                        var aType = s.attr('itemName');
                        var point = s.slider("option", "value");
                        paramList.push(aType);
                        paramList.push(point);


                    });

                    CallPageMethod("SliderChanged", paramList, success, fail);
                    //                    $("#img1").fadeOut();
                    //                    alert("done");
                },
                slide: function (e, ui) {
                    var point = ui.value;
                    $("#selected_value").html(point);
                    //                    var width = 100 - point;
                    //                   $("#range").css({ "width": point + "%" });
                }

            });

            function CallPageMethod(methodName, paramArray, onSuccess, onFail) {

                //create list of parameters in the form
                //{"paramName1":"paramValue1","paramName2":"paramValue2"}

                var paramList = '';
                if (paramArray.length > 0) {
                    for (var i = 0; i < paramArray.length; i += 2) {
                        if (paramList.length > 0) paramList += ",";
                        paramList += '"' + paramArray[i] + '":"' + paramArray[i + 1] + '"';
                    }
                }
                paramList = '{' + paramList + '}';


                //get the current location
                var loc = window.location.href;
                loc = (loc.substr(loc.length - 1, 1) == "/") ? loc + "default.aspx" : loc;

                //call the page method
                $.ajax({
                    type: "POST",
                    url: loc + "/" + methodName,
                    data: paramList,
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: onSuccess,
                    fail: onFail

                });

            }


            function success(response) {

                var lbl = $('#<%= Label1.ClientID %>')
                lbl.html("Your report is now ready for download.");
                alert(response.d);

            }

            function fail(response) {
                alert("An error occurred.");
            }

        });


   </script>

I have the following web methods:

  [WebMethod]
    public static string SliderChanged(string[] values)
    {

        return "successArray";


    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:31:30+00:00Added an answer on May 25, 2026 at 3:31 pm

    As other people have said, you need to specify the parameter name; therefore,

    data: paramList,
    

    Should be:

    data: '{ "values":'+paramList+'}',
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to add rows to my repeater using jQuery using below script.It
I want to submit a with using jquery as below; $(#formid).submit(); Its working perfect
When using jQuery 's ajax method to submit form data, what is the best
I'm trying to make a scrolling calendar script using jquery (similar to the one
Using the jQuery code below, I'm trying to take a JSON object to create
I'm making an ajax call using jQuery as below. $.ajax({ type: POST, url: proc.php,
I'm trying to display rss feed using jQuery plugin jFeed as below. It's printing
Using jQuery, how do you bind a click event to a table cell (below,
i am adding collection of radio buttons to my page using jQuery below $(document).ready(function()
I will be using some jQuery below this chunk of code (which I may

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.