Javascript (or otherwise) "Waiting" page?

Hi All,

I'm trying to figure out the best of a million ways to generate a waiting page. For instance, if I have administrators waiting to approve "Posts" that are in queue, and there are currently no "Posts" waiting to be approved, I'd like them to be sent to a "Waiting" page until more are available then refresh every few seconds and Javascript redirect them to the "Approval" page once more are available.

Is this a reasonable enough request? How would I go about it?

Thanks in advance.

Hi All,

I'm trying to figure out the best of a million ways to generate a waiting page. For instance, if I have administrators waiting to approve "Posts" that are in queue, and there are currently no "Posts" waiting to be approved, I'd like them to be sent to a "Waiting" page until more are available then refresh every few seconds and Javascript redirect them to the "Approval" page once more are available.

Is this a reasonable enough request? How would I go about it?

You could easily enough have a periodically_call_remote that would
poll some url. when the time is right have that page render
page.redirect_to :action => 'the_good_stuff' (assuming you are using
rjs).

Fred

Could you use RJS to call a helper method? Also, I'm having the worst time with Rails and routing. I create custom routes but it is insistent on finding an Object with "said" ID. I know it's breaking form, but I'd like to be able to have a "waiting" route that is part of a particular path, and have it render the "waiting.html.erb" page without complaint. I'd assume there is a way to do that, but I've been out of the Rails loop for a bit.