Forum: Ruby on Rails Frames

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C687aa87c98c371044f84d28a72496ca?d=identicon&s=25 Brad Eck (bradeck)
on 2006-01-10 02:50
(Received via mailing list)
Well, I know there's a better way (not using frames) but bear with me
while we get rev 1 out the door and then switch. In the meantime I need
to redirect from one frame into another and cannot for the life of me
figure out a reference to get to another frame:



redirect_to :controller => testController', :action => testProc'





I cannot seem to add :target or any other similar item to tell it which
frame to redirect into. Thoughts? Help? Thanks!



_______________________
Brad Eck
Sr. Software Engineer
Pelco
3500 Pelco Way
Clovis, CA 93612
Office - 800-289-9100
Email - beck@pelco.com <BLOCKED::mailto:beck@pelco.com>
317aad7f9f0b69a440faca74bbe22b20?d=identicon&s=25 Jakob Skjerning (Guest)
on 2006-01-10 07:38
(Received via mailing list)
On Jan 10, 2006, at 2:49, Eck, Brad wrote:
> Well, I know there?s a better way (not using frames) but bear with
> me while we get rev 1 out the door and then switch. In the meantime
> I need to redirect from one frame into another and cannot for the
> life of me figure out a reference to get to another frame:
>
> redirect_to :controller => testController', :action => testProc'
>
> I cannot seem to add :target or any other similar item to tell it
> which frame to redirect into. Thoughts? Help? Thanks!

Well, that's because you can't. Redirect_to happens on the server
side, frames is a way to put multiple browser windows into the same
browser window on the client side. The two cannot work like you want
them to, and you can only redirect_to the same window as you've found
out.

You need to either do some Javascripting, replace the part of your
HTML that contains the frame source URL, or ditch the frames entirely
(highly recommended).


--
Jakob Skjerning - http://mentalized.net
This topic is locked and can not be replied to.