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 Weiss
on 2006-05-10 21:15
on 2006-05-10 21:45
on 2006-05-11 00: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.