trouble with popup window

I would like to have a "Print" link which when clicked, calls my
print_list method to populate the print_list view, then opens the
print_list view in a NEW browser window. I'm using Firefox 1.5.0.9.

So far I have:
  <%= link_to "Print", :action => 'print_list', :popup => true %>

This partially works - it calls the print_list method which properly
generates and populates the view. However, I can't get it to come up in
a NEW window instead of overlaying my current window. I've tried
various permutations of braces and using variables instead of "true".
Here's another example of what I've been trying:

  <%= link_to "Print", {:action => 'print_list'}, {:popup =>
['new_window', 'height=300,width=600']} %>

But how can I get a NEW window to pop up with my printable view in it?

Also, I'd like to have the File|Print dialog box automatically come up
when the new window opens. How do I get that to happen?

Thanks for the help,
Shauna

I would like to have a "Print" link which when clicked, calls my
print_list method to populate the print_list view, then opens the
print_list view in a NEW browser window. I'm using Firefox 1.5.0.9.

So far I have:
  <%= link_to "Print", :action => 'print_list', :popup => true %>

This partially works - it calls the print_list method which properly
generates and populates the view. However, I can't get it to come up in
a NEW window instead of overlaying my current window. I've tried
various permutations of braces and using variables instead of "true".
Here's another example of what I've been trying:

  <%= link_to "Print", {:action => 'print_list'}, {:popup =>
['new_window', 'height=300,width=600']} %>

But how can I get a NEW window to pop up with my printable view in it?

Also, I'd like to have the File|Print dialog box automatically come up
when the new window opens. How do I get that to happen?

This is an example from my current project that I know opens a new
window:

<%= link_to 'Preview',{ :controller => 'publish', :action => 'preview',
:id => page }, :popup => true %><br/>

If you don't have an id then just leave it out.

If it is still displaying in the same browser tab then it is probably
your browser setting.

hope that helps -K

Hi Craig,

I tried your permutation and the results are no different. It displays
the print_list view in the same browser tab, overwriting the original
page. I want the original page to remain and the printable page to come
up in a new browser window.

By the way, my action doesn't usea specific id - it's just a list of the
entire table in the order the user has picked.

Craig White wrote:

OK remove the id portion but I suspect that the reason that it isn't
popping up a window for you is that you need the javascripts library and
thus need to include a layout that has <%=
javascript_include_tag :defaults %> in it.

Craig

I do have <%= javascript_include_tag :defaults %> in my
application.rhtml, and all the default js libs show up in the page
source code for my page.

I am also using rico.js. I tried removing that but it makes no
difference to the popup window.

Shauna