On Sep 28, 2011, at 5:58 PM, hobo_hippy wrote:

> I've created a webmethod based button, however if you click the button
> really fast before the page reloads, the webmethod is called as many
> times as you click!! This will not do. I've tried disabling the button
> onmouseclick, onmousedown, onmouseup, etc. to no avail. all the above
> attempts looked something like:
> 
> <form ... onmouseclick="this.disabled=true"> <button> ... </button> </
> form>
> 
> again, none of these worked. Has anyone had any success getting this
> to work? I've done a lot of google searching to find a solution, but
> found no clean solutions.

The underlying Rails function (button_to) isn't particularly well-documented, 
but it does support the :disable_with option which swaps out the button name 
and disables it. In DRYML, you'd write it as disable-with="Some text".

It *should* work - if it doesn't, let me know and I'll try to fix it ASAP.

--Matt Jones

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to