Can I send a redirect_to() call to a periodically_call_remot

Hi,

I’m using Rails 1.1 and the periodically_call_remote() helper to
query the server for the progress of a long running action.

I’m using the excellent new RJS partials to send a page.replace_html()
to update the status information on the page–which works very
well.

When the action completes I’m also trying to send a redirect_to()
by the same approach–which doesn’t seem to work in that the browser
window and URL bar are not updated.

Is there something special about the context of the
periodically_call_remote() function that means I need to force
browser redirects in another way?

Any advice much appreciated,

Stu

i fairly new at rails (haven’t even tried out RJS yet) … but you’ll
need to
send the equivalent of

If you use

page.redirect_to(‘someplace/else’)

the javascript sent back to the browser is something like

location.href = ‘someplace/else’;

This should handle your redirect.

View this message in context:
http://www.nabble.com/Can-I-send-a-redirect_to()-call-to-a-periodically_call_remote()-function-…-t1535486.html#a4172286
Sent from the RubyOnRails Users forum at Nabble.com.