Controller redirect_to to leave iframe


#1

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)


#2

On May 7, 7:43 pm, nextpulse removed_email_address@domain.invalid 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)

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


#3

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

===============================================================================
Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache

www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz


#4

I used a quick workaround. Replace the redirect_to with:

render :text => “window.parent.document.location.href = ‘/myloc’;</
script>”


#5

I think this works better:

Kiyoshi


#6

thanks.
Seems like I may have to render some JS in the controller to call the
parent.

On May 7, 11:46 am, Frederick C. removed_email_address@domain.invalid