Inside an iframe, I want the controller to redirect_to to the parent (i.e. target ='_parent'). Any ideas? (Everything I've tried- via redirect_to - just keeps it inside the iframe)
i don't think you can do this server side - you need to set the right target attribute etc on the link and so on.
Fred
nextpulse wrote:
Inside an iframe, I want the controller to redirect_to to the parent (i.e. target ='_parent'). Any ideas? (Everything I've tried- via redirect_to - just keeps it inside the iframe)
use responds_to_parent plugin
tom
thanks. Seems like I may have to render some JS in the controller to call the parent.
I used a quick workaround. Replace the redirect_to with:
render :text => "<html><body><script type='text/javascript' charset='utf-8'>window.parent.document.location.href = '/myloc';</
I think this works better:
<script>parent.location.href='/foo';</script>
Kiyoshi