# Disabled submit button

**URL:** <https://www.ruby-forum.com/t/disabled-submit-button/107929>\
**Category:** Rails\
**Created:** [June 27, 2007, 5:27pm UTC](https://www.ruby-forum.com/t/disabled-submit-button/107929 "2007-06-27T17:27:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![difei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a4c791/32.png) [@difei](https://www.ruby-forum.com/u/difei)\
**Post date:** [June 27, 2007, 5:27pm UTC](https://www.ruby-forum.com/t/disabled-submit-button/107929/1 "2007-06-27T17:27:23Z")

</div>

Greetings all,

I created a form\_remote\_for form for some AJAX jobs and I would like the  
submit button to be disabled when you click the submit button and  
reenable it after the jobs are finished, so I add a

:onclick =\> “document.getElementById(‘addub’).disabled = true”

for the submit\_tag, but I found that this will break the other functions  
(the corresponding RJS file I’ve written for highlighting and reenable  
the button) in IE6. All are OK in Firefox, could anyone tell me how to  
archive this in both IE6 and Firefox? thanks very much!

Cheers,  
Difei
