EvanBot Robot

Comments (6)

Post Comment Back To Article

paul irish

Similarly this oneline could do the trick:

$('form').submit(function(){ $(':button',this).attr('disabled','disabled');});

Mar. 16th, 2009 9:18 PM

Evan Byrne

@paul: Your code doesn't remove the disabled attribute so if you refresh the page the button will still be disabled. Plus your snippet can only disable buttons.

Mar. 17th, 2009 9:02 AM

jcargoo

Here is another example:
http://www.jcargoo.org/2009/01/submit-button-enabling-with-jquery.html

Mar. 18th, 2009 2:59 AM

atlantis151

$('form').submit(function(){
$(':submit, :button',this).click(function(){
return false;
})
});

Apr. 6th, 2009 4:57 AM

AG

Is it working with type image ?

3:23 PM - February 23, 2010

Evan Byrne

I don't know, but you could always try it.

3:34 PM - February 23, 2010

Post Comment

Capcha