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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:55:24+00:00 2026-05-27T02:55:24+00:00

Hey basically just having a little trouble with the following, submitting a message from

  • 0

Hey basically just having a little trouble with the following, submitting a message from a textarea, and on clicking of the submit button the following runs… I need the button to be disabled or another way which stops the user from clicking the button several times and submitting the message over and over again. I think I know where I am going wrong below that it is disabling the button before it is submitting?. At the moment with the disabling code in, it disables the button but does not submit the message, if I remove it, it submits fine.

$("#leaguesubmit").click(function(){        
 if($('#messageinput').val().length > 300 || $('#messageinput').val().length == 0 || $('#messageinput').val() == "Please enter your league message here..." ){
    return false;

}else{
$("#leaguesubmit").attr("disabled","disabled");
return true;
}
});
  • 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-27T02:55:25+00:00Added an answer on May 27, 2026 at 2:55 am

    You’re right; once ‘disabled’ is set, the form won’t submit. Try setting some other attribute when the form is submitted, and checking for it if the button is clicked again as part of the validation you’re already doing:

    $("#leaguesubmit").click(function() {        
      if($('#messageinput').val().length > 300 
         || $('#messageinput').val().length == 0
         || $('#messageinput').val() == "Please enter your league message here..."
         || $('#leaguesubmit').attr('submitted'))
      {
        return false;
      } else {
        $('#leaguesubmit').attr('submitted', true);
        return true;
      }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey all, basically i have an empty AS3 fla file with just the following
Hey, so I'm having a bunch of trouble getting ExternalInterface to work, which is
Hey, how can I make it so that there's basically just a semi transparent
Hey guys, basically what Im having problems currently is finding a way to parse
Hey guys. Just like in the title - I'm having some problems doing it.
Hey all, having an issue getting asp buttons to interact with JQuery. I'm basically
Hey everyone, I am having a problem with a website I'm trying to build;
Hey all. Basically, I need (this) in my function to correspond to this selection:
Hey guys I'm running into a weird issue.. Basically, a user logs into a
Hey, so basically I have this issue, where I'm trying to put an equation

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.