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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:05:19+00:00 2026-05-27T10:05:19+00:00

My problem is that if I click a button and the ajax has not

  • 0

My problem is that if I click a button and the ajax has not returned yet and I click another button (or the same button) then I end up getting two tables on screen instead of one.

Scenario :
I am building a form and presenting a set of options based of drop down selections. Year/Make/Model combo’s bring back a set of product lines – Carpets/Bumpers/Floor Mats/ Sound Deadners etc. Each one of those will become a button and when pressed will bring back the products for that product line.

The products are then looped over and I create a table via javascript to display them. If I push a button once and wait for the table to be displayed everything is good. If I choose another product line the products table is removed and then the ajax call returns the new products and build them into a table again via javascript. The problem I get is when the same button or a different product line button is clicked before a table is built from the first click I get two tables showing.

  • 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-27T10:05:20+00:00Added an answer on May 27, 2026 at 10:05 am

    Without really understanding your question due to is vague nature I can only really suggest looking at the following -> the jQuery AJAX Global events

    Specifically the .ajaxStart() and .ajaxComplete() methods you could use these to disable buttons with the same class on ajaxStart – then re-enable them on ajaxComplete

    Example :

    $(document).ajaxStart(function(){ 
      $('.buttonsclass').attr('disabled','disabled');; 
    }).ajaxComplete(function(){ 
      $('.buttonsclass').removeAttr('disabled');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My problem is that I can only seem to click the button once, if
One problem that I come across regularly and yet don't have a solution to
The problem that I am having has to do with the need to keep
A problem that has frequently come up in my career is I have some
This has been a problem that I haven't been able to figure out for
Greetings all, I'm an AJAX newbie, and I'm having a problem with same origin
I have a form with a table that has two input boxes, a select
I'm trying to use Ajax in CakePHP, and not really getting anywhere! I have
I have made my own jQuery plugin, but it has problem that values I
A problem that we need to solve regularly at my workplace is how to

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.