# Selecting an option from another window

**URL:** <https://www.ruby-forum.com/t/selecting-an-option-from-another-window/138183>\
**Category:** Rails\
**Created:** [May 20, 2008, 9:39pm UTC](https://www.ruby-forum.com/t/selecting-an-option-from-another-window/138183 "2008-05-20T21:39:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![schof](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8dc957/32.png) [@schof](https://www.ruby-forum.com/u/schof)\
**Post date:** [May 20, 2008, 9:39pm UTC](https://www.ruby-forum.com/t/selecting-an-option-from-another-window/138183/1 "2008-05-20T21:39:14Z")

</div>

User needs to pick a single asset from a list of assets shown via a  
popup window. ATM the popup view is just a simple index/list view of  
asset resources. Right now the user can manually enter an asset  
identifier after finding the desired asset in the popup.

I’m interested in allowing the user to select the requested option by  
double clicking it. I would appreciate any suggestions on how to  
handle this.

I’d also like to close the window when done. Is this possible if the  
popup opens as a separate tab in FF?

TIA,

Sean

---

<div class="post-metadata">

**Author:** ![schof](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8dc957/32.png) [@schof](https://www.ruby-forum.com/u/schof)\
**Post date:** [May 22, 2008, 7:36pm UTC](https://www.ruby-forum.com/t/selecting-an-option-from-another-window/138183/2 "2008-05-22T19:36:43Z")

</div>

On 5/20/08, schof [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> User needs to pick a single asset from a list of assets shown via a  
> popup window. ATM the popup view is just a simple index/list view of  
> asset resources. Right now the user can manually enter an asset  
> identifier after finding the desired asset in the popup.
> 
> I’m interested in allowing the user to select the requested option by  
> double clicking it. I would appreciate any suggestions on how to  
> handle this.

Have a look at Javascript’s window.opener. That’s your path back to  
the window that opened the popup. Use that to access the dom of the  
opener.

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)
