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

  • Home
  • SEARCH
  • 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 957401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:41:40+00:00 2026-05-16T00:41:40+00:00

I have button and that jQuery script (to start the progress bar): <script src=../_Files/JScripts/jquery-1.3.2.js

  • 0

I have button and that jQuery script (to start the progress bar):

<script src="../_Files/JScripts/jquery-1.3.2.js" type="text/javascript"></script>
<script src="../_Files/JScripts/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>

 var intervalID;
 $("#<%=this.Button1.ClientID%>").click(
            function() {

                intervalID = setInterval(updateProgress, 500);

                $.ajax({
                    type: "POST",
                    url: "CustomerImport.aspx/ExecuteImport",
                    data: "{}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    async: true,
                    success: function()
                    {
                        $("#progressbar").progressbar("value", 100);
                        clearInterval(intervalID);
                        $("#result").text('ok');
                    }
                });

                return false;
            }
        );

   function updateProgress() {

            $.ajax({
                type: "POST",
                url: "CustomerImport.aspx/GetProgress",
                data: "{}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                async: true,
                success: function(msg) {
                    $("#result").text = msg.d;
                    var value = $("#progressbar").progressbar("option", "value");
                    if (value < 100) {
                        $("#progressbar").progressbar("value", msg.d);
                        $("#result").text(msg.d);
                    }
                    else {
                        clearInterval(intervalID);
                        window.location = window.location;
                    }
                }
            });
        }

the method:

    [System.Web.Services.WebMethod]
    public void ExecuteImport()
    {
        _Presenter.ExecuteImport();
    }

the problem is, that method is NOT being invoked. Why ?

When I replace the $.ajax for the e.g alert('ok'); the alert shows, so it works

  • 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-16T00:41:40+00:00Added an answer on May 16, 2026 at 12:41 am

    Did you decorate your service class with the [ScriptService] attribute? Also try changing the data parameter to: data: { }. What does FireBug says about this? Is there a request being sent? If yes what does the server respond?

    Also you have a mistake in your url (web services have the ASMX extension). You wrote:

    CustomerImport.aspx/ExecuteImport
    

    While it should be:

    CustomerImport.asmx/ExecuteImport
    

    Here’s a complete working example that you may adapt to your needs:

    Web service:

    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    [ScriptService]
    public class CustomerImport : WebService
    {
        [WebMethod]
        public void ExecuteImport()
        {
        }
    }
    

    Calling web page:

    <%@ Page Language="C#" %>
    <!doctype html>
    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Test</title>
        <script type="text/javascript" src="scripts/jquery-1.4.1.js"></script>
        <script type="text/javascript">
            $(function () {
                $.ajax({
                    type: 'POST',
                    url: '/CustomerImport.asmx/ExecuteImport',
                    data: { },
                    success: function () {
                        alert('ok');
                    }
                });
            });
        </script>
    </head>
    <body>
    
        <form runat="server">
    
        </form>
    
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a script that I am developing that creates a sliding button type
If I have a button that sets off a jquery script is there a
I have a button that does not work in jquery. A button is passed
I have event Button that creates text box in run time. Private Sub Button1_Click(ByVal
I am currently working on rails3 application that uses jQuery. I have a javascript
I have a jquery game that you can view here link text The game
I have a jquery game that you can view here link text The game
So I am very new to using jQuery and I have a script that
I have a stopwatch feature that is toggled by a start/stop button. When the
I have a form that is submitted to a php script with jquery and

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.