Hello,
I’m trying to use the rail link_to to open a popup window and then
print the popup window at the same time. Is there a way to add
another “onclick” option to tell the popup to print? I know how to do
this in javascript but not sure how to use the rails help to do it. I
also am aware that the link_to_function method is used to call a
javascript function. Here’s the code I have to open the popup:
<%= link_to icon(‘icon_printer’, :alt => ‘Print’) + ‘Print Cable’,
{:controller => ‘print_popup’,
:action => ‘display_popup’,
:doc => @document,
:header => ‘My Doc’},
:title => ‘My Title’,
:popup => [‘display_popup_to’,
‘width=650,height=600,scrollbars=yes, menubar=1’]%>