Stop duplicate messages being posted from submit button
<p>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.</p>

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

}else{
$("#leaguesubmit").attr("disabled","disabled");
return true;
}
});
</code></pre>
