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 6561201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:33:28+00:00 2026-05-25T13:33:28+00:00

It would appear that ajaxStart in my MVC 3 project is working but not

  • 0

It would appear that ajaxStart in my MVC 3 project is working but not ajaxStop or ajaxComplete. The problem is not browser specific as I’ve tested this in IE9, Mozilla and Chrome.

My project is just taking a series of letters and finding the combinations/permutations and displaying them to the user. The ajax function is initiated, the ajaxStart is fired and the “please wait” indicator appears. When the ajax call is complete (I would assume) the table is populated but the ajaxStop/ajaxComplete is never fired and the “please wait” indicator never goes away.

Here’s the javascript I use:

$(document).ready(function () {
    $(document).ajaxStart(function () {
        $('#ajaxBackground').show();
        $('#ajaxProgress').show();
    });

    $(document).ajaxStop(function () {
        $('#ajaxBackground').hide();
        $('#ajaxProgress').hide();
    });

    $('#submit').click(function () {
        var p = $('#prefix').val();
        var l = $('#letters').val();
        var s = $('#suffix').val();

        $.ajax({
            url: '@Url.Action("Search", "Home")',
            type: 'POST',
            dataType: 'json',
            data: { prefix: p, letters: l, suffix: s },
            success: function (jsonresults) {
                $('#searchResults').find('tr').remove().end();
                for (var i = 0; i <= jsonresults.length; i++) {
                    $('#searchResults').append('<tr><td>' + jsonresults[i].word + '</td><td>' + jsonresults[i].length + '</td><td>' + jsonresults[i].score + '</td></tr>');
                }
            },
            error: function () {
                alert('error');
            }
        });
    });
});

Is there something I missed. Any help would be greatly appreciated. Thanks.

  • 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-25T13:33:29+00:00Added an answer on May 25, 2026 at 1:33 pm

    Normally this should work. I suspect that your #submit is either a form submit button or an anchor. You have subscribed to the click event of this element which is where you fire the AJAX request. But you do not cancel the default action of this element because you didn’t return false at the end of your function. So your AJAX request is trigerred and then the browser is redirected away and doesn’t have time to finish the processing of this AJAX request.

    So try returning false just after the $.ajax function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am a newbie working towards developing an IE extension that would appear as
From extensive googling, it would appear that I'm not the first person to encounter
Running my (rather complex) JavaScript/jQuery application in Google's Chrome browser, it would appear that
I know people have asked this before, but it would appear that their solution
Been hunting for an hour or so. It would appear that db.Float does not
It would appear that the curses library is specific to the operating system. Given
It would appear that I am suffering from a new bug in IE7, as
It would appear that FileReference.upload() is the only way in which you can upload
It would appear that Rhino is included in any version passed Java 6. How
so it would appear that the only values that actually work are 0.0, 0.5,

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.