Ajax "Waiting..." flash while round-tripping

I’m trying to figure out how to best allow a user to click a
link_to_remote (or something like it) that will make the clicked thing
disappear and replace it with a “Saving…” or “Please wait…” image
until the server round-trip is complete. Once complete, it needs to
replace the HTML in that span or div with text from the server.

I imagine it will involve linking to a javascript function that can set
it to not display the current image and show the “Please wait…”
graphic. But then getting the AJAX call made from there has me stumped.

Anyone able to enlighten me on this?

-Mark E.

Mark Spamfre <[email protected]…> writes:

I’m trying to figure out how to best allow a user to click a
link_to_remote (or something like it) that will make the clicked thing
disappear and replace it with a “Saving…” or “Please wait…” image
until the server round-trip is complete. Once complete, it needs to
replace the HTML in that span or div with text from the server.

What about the :loading option?
http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#M000412

Cheers,
Marco

Marco L. wrote:

http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#M000412

That may be perfect! I didn’t know about that. Thanks!

-Mark E.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs