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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:27:59+00:00 2026-06-10T01:27:59+00:00

I have a MVC application where i call a jquery post method on textbox

  • 0

I have a MVC application where i call a jquery post method on textbox blur function.
The problem is the form has many input fields and on each input field blur call same ajax method, and if users click in and out in different text boxes very fast, the ajax method call two three times and resulted in wrong result.

Here is an example

    Flight 1
    Airline     Flight #    Class         Date
S1  TextBox1    TextBox2    TextBox3      TextBox4 
S2  TextBox1    TextBox2    TextBox3      TextBox4 
S3  TextBox1    TextBox2    TextBox3      TextBox4

One solution to this which i tired is to Disable all input filed when calling ajex like this

function Submit() {
     $('input').attr("disabled", "disabled");
     $.post("/ItineraryBuilder/GetFlightData", { opportunityId: oppID}, function (data) 
     {
          $("#DivResult").html(data);
          $('input').removeAttr("disabled");
     }
}

This disable all input fields and restrict user to in-out from textboxes frequently which in turn do not call Ajax post again and again. But as soon as input fields are disabled, focus has been also lost and make it difficult to use TAB in this case.

So is there any way i can lock down the ajax call or Controller/Action for a while so until one action is in process another will not start, or any other better way to do this?

Hope i clear my point.

  • 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-06-10T01:28:00+00:00Added an answer on June 10, 2026 at 1:28 am
    if($.active){ 
      //there's an ajax function running
    }else{ 
      //there's no ajax function running
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a MVC application which has a Controller that has a recursive method
I'm trying to call an action method in an MVC application using jQuery. Basically
I have an ASP.Net MVC 3 application that uses a jQuery .ajax call to
I have an MVC application which has a set of fields for contact details
I have an ASP.Net MVC application. I am trying to post data to an
I have controller method in my MVC application that I am calling using the
I have a MVC application with Jquery; I have a gridview with some data
I have asp.net mvc application. i want to configure the object in jquery and
I have an MVC 2 application. On the client side there is a function
I have an Asp.net MVC application which uses html5 and jquery on the client

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.