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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:33:49+00:00 2026-06-01T04:33:49+00:00

How can I stop sending data to the server if the button allready has

  • 0

How can I stop sending data to the server if the button allready has been clicked ? I don’t want a disable=”disabled” response (buttons are custom made).

I tried setting a global var button_clicked = FALSE; set it true when button has been clicked, after that set it again to false when the response has been received . But that doesnt work neither because my mouse is messed up and spam clicks really fast (although i click only once -> this actualy helped me to see that the method mentioned isn’t so acurate).

Are there better methods to stop a process or disable a DOM element onClick? Maybe disable the event? js or jquery answer preferable . Or maybe this really can’t be done on really fast requests . I know it depends on alot of things (like user’s cpu). Any comment or answer is welcome. Maybe for every click on the page set the user to wait for some miliseconds ?

  • 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-01T04:33:50+00:00Added an answer on June 1, 2026 at 4:33 am

    Try this little constructor:

    function MyForm()
    {
      this.check = false;
    
      this.form = function(){
        var f = this;
        $('#form').submit(function(e){
          e.preventDefault
          if( f.check === false )
          {
            f.check = true;
            $.ajax({
              ...blah blah
              success: function( data )
              {
                //if you want to let them send again, uncomment this next line
                //f.check = false;
              }
            })
          }
      });
      this.form();
    }
    
    $(document).ready(function(){
      var my = new MyForm();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In .NET (C#, specifically), how can I stop navigation? Situation: User has clicked a
Is there any method so that I can stop syncing to gmail. I want
I have looked and tried but don't see where I can stop some being
I'm using a UdpClient at the server end and it is sending data to
I have a file transfer application (server-client) ... while sending a file, i want
I am trying to make a server which can send data to more than
Is there a way I can stop all processes in a certain directory through
I'm trying to write a program that can stop and start services using SilverLight
How can I stop a background thread on keyboard flip in android?
How can I stop a build, and notify the user if a file does

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.