Easy way to redirect to "Please Wait" page while JSON request completes?

Hello friends -

I have a rails app that uses JSON to send requests to another server.
server processes the request and sends a JSON response back to the rails

At first I was sending the requests using AJAX but the requests may take
to 30 seconds, and users double-submitted, reloaded, etc. So, I was
that upon submitting a request, I could then have rails forward to a
wait while we are processing your request” page. From there, rails will
the request and wait for a response. When the response is received (or a
timeout of 45 seconds is reached), I can redirect appropriately to the
result page.

My question is, I am not sure how to achieve this effect of having a
wait” page while asynchronously checking another server for a result.
anyone have any tutorials/advice/links on how to achieve this?

Alternatively, I have seen (using prototype or jquery) sites where when
press the submit button, the screen greys out and a window is tiled on
informing the user that the request is being processed. Is it possible
utilize this method using ajax?


You can just use a loading panel (that is also modal) to keep the user
from double submiting ->

On Thu, Sep 4, 2008 at 7:26 PM, Jin L. [email protected] wrote:

the request and wait for a response. When the response is received (or a
utilize this method using ajax?


Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/
João Pessoa, PB, +55 83 8867-7208

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