# Help moving data from one view to another

**URL:** <https://www.ruby-forum.com/t/help-moving-data-from-one-view-to-another/125410>\
**Category:** Rails\
**Created:** [January 8, 2008, 10:18pm UTC](https://www.ruby-forum.com/t/help-moving-data-from-one-view-to-another/125410 "2008-01-08T22:18:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubylicious](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@rubylicious](https://www.ruby-forum.com/u/rubylicious)\
**Post date:** [January 8, 2008, 10:18pm UTC](https://www.ruby-forum.com/t/help-moving-data-from-one-view-to-another/125410/1 "2008-01-08T22:18:13Z")

</div>

I’m developing an application that has several data models that are  
related as such: (–\> denotes “consists of”)

Course --\> Topics --\> Screens

Screens are based on HTML templates called “building blocks”. These  
building blocks are identified by an id number.

So, If I want to create a new screen, I have to select which building  
block it’s based on. So, my new screen view has a button that opens a  
popup window containing a thumbnail list of the building blocks. I have  
radio buttons setup to identify in the form post which building block I  
want.

Once I select the building block, I can make the appropriate new screen  
view appear with the id in the appropriate field, however I can only get  
the new screen view to open via a redirect which simply opens the new  
screen view in the popup window instead of in the main application  
window where I opened the popup from in the first place.

How do I get the popup to go away and the new screen view to appear in  
the main app window? I know I can do all this via the DOM using  
javascript, but I’m trying to utilize/learn the ruby on rails niceties  
instead.

Thanks in advance.
