Wednesday, January 20, 2010

Re: [Rails] disable submit_tag after click

When you write that onclick, don't you have to also make it submit the
form? Try this:

<%= submit_tag 'Save', :class => 'submit', :onclick =>
"document.getElementById('save_button').disabled=true;document.forms["myform"].submit();",
:id =>
"save_button" %>

changing the id, obviously.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate