# Link\_to\_remote and open new window passing parameters

**URL:** <https://www.ruby-forum.com/t/link-to-remote-and-open-new-window-passing-parameters/162062>\
**Category:** Rails\
**Created:** [March 5, 2009, 11:28am UTC](https://www.ruby-forum.com/t/link-to-remote-and-open-new-window-passing-parameters/162062 "2009-03-05T11:28:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kinunt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/7c8e57/32.png) [@kinunt](https://www.ruby-forum.com/u/kinunt)\
**Post date:** [March 5, 2009, 11:28am UTC](https://www.ruby-forum.com/t/link-to-remote-and-open-new-window-passing-parameters/162062/1 "2009-03-05T11:28:25Z")

</div>

Hi,  
I would like to implement this:  
I have a view that shows a list of elements. Each element have a  
checkbox. The user can select some events marking the checkbox and click  
the link\_to\_remote “Print this elements”. When this link is clicked  
another window is open with only the selected events and is printed (ala  
Google Maps).

I have coded the selection of items and I’m able to open a new window. I  
use the link\_to\_remote like this:

\<%= link\_to\_remote ‘Imprimir incidencias marcadas’,  
{ :url =\> ‘/incidencias/popup’,  
:submit =\> ‘table’  
} %\>

The elements are submited properly. I know how to open the new window:

popup.rjs:

page \<\< “window.open(’/events/print’, ‘print’,  
‘left=20,top=20,width=500,height=500,toolbar=1,resizable=0’ );”

But I don’t know how to pass the list of elements from popup.rjs to  
/events/print in the new window!!

Any idea will be appreciated.
