To add a bit more to this, I also added some code to (optionally) disable a form while a remote call is in progress and re-enable it when the action is complete. This way a user can't hammer away at a form that's already been submitted.
On 4/29/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote:
I've implemented the same thing for my own projects and you can pretty much move that pattern into the remote_function method to take care of any remote call. I allow the progress indicator to be optional and I have a seperate helper that allows the user to place the indicator wherever they want on the page. I'm not sure what solution you came up with, but my stuff works with the remote form helpers and like I mentioned above, the indicator can be placed anywhere the user likes. I wasn't sure if it was core worthy or not, maybe plugin?? On 4/29/06, David Felstead <[EMAIL PROTECTED]> wrote: > Hi everyone, > > Just a quick question to check if it's worth submitting a patch for > this enhancement - I've discovered when doing lots of AJAX work that > the most common pattern I've encountered for using submit_to_remote > and link_to_remote tags involves creating a hidden 'busy indicator' > (usually an animated gif) and adding js code in the :before and > :complete options to hide and show the button and busy indicator at > the beginning and end of the request. > > I've created a couple of useful helpers that automatically generate > the tags for the submit button/link, the busy indicator and the > related javascript, and was wondering if it's worth sumitting an > enhancement patch for? It's very simple, but takes a lot of the > repetition out of doing AJAX stuff. > > Cheers, > > -David Felstead > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core >
_______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core