Hi, I am calling an action via AJAX to update a div. The action needs to redirect the page in under certain circumstances. However, if I just use "redirect_to" in the action then of course what happens is that the page I want to redirect to replaces only the div, not the entire page, and I get messy nested layouts. Is there a way around this? Can I redirect the entire document from an action that is called via AJAX to update a div? Thanks for any help! Ingo W.
on 2006-05-10 23:15
on 2006-05-10 23:45
on 2006-05-11 02:10
You can also conditionally render an .rhtml file that contains a script block something like: <script> document.location.href = "..."; </script> PrototypeHelper will by default try to evaluate scripts in returned blocks.