##############################################################################
# Overrides sumit_tag for disable save after click event --JAGAN REDDY
##############################################################################
def commit_tag(value,options={})
options.stringify_keys!
submit_tag value, options.merge(:onclick => '
if(window.addEventListener)
{
this.disabled = true;
}
else
{ // IE
// this.disabled = true;
setTimeout(m(), 10000);
}
function m()
{
// var tag = window.event.srcElement.tagName
this.disabled = true;
}')
end
use this in apllication_helper.rb
Tuesday, August 19, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment