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

Ask A Question

Stats

  • Questions 518k
  • Answers 518k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If they just want to test a dev build as… May 16, 2026 at 8:20 pm
  • Editorial Team
    Editorial Team added an answer Your best bet would be to add functionality to the… May 16, 2026 at 8:20 pm
  • Editorial Team
    Editorial Team added an answer Problem solved, I created a new projected and copied all… May 16, 2026 at 8:20 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have a javascript (jquery) snippet that is link to a href=# to toggle
I have a small jQuery plugin that I use for form AJAX validation. There
I am trying to learn javascript/jquery, using firebug to debug and have built a
Suppose I have following html page. <html> <head> <link type=text/css rel=Stylesheet href=css/some.css /> </head>
I am brand new to Jquery and have run into something that if answered
I have a submit button when i click on that button i am having
I'm pulling my hair out trying to get a jQuery script working that will
I have a table of data on my page. The columns are start, end,
I have a script for exporting results of a mysql query as a csv
I have a page that has a number of weblog entries on it. Some

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.