Forum: Ruby on Rails Page print for lightwindow

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bcc578efe3bb69e763ec7695d675c06a?d=identicon&s=25 Srinath A. (srinathbtech)
on 2008-10-20 16:45
Hi,
I was pondering how to print (printing on white paper with printer) the
page opened in lightwindow . i was getting a list of foods on the page
and provides a mouse over link for each food to open a lightwindow with
total food details.
when lightwindow popup opens i was providing two links print and close
when clicked on print i was getting a print out with the lightwindow
page and also list of foods existing in background.

in view :

<li><a id="fooditem_<%= fm.id %>_recipe_popup_link"
href="#recipe_popup_<%= fm.id %>" href="javascript:void(0);"
class="lightwindow"  params="lightwindow_width=475">Recipe and
Details</a></li>

<div id="recipe_popup_<%= fm.id %>" class="recipe_popup">
<div class="recipe_header"><a href="javascript:print()">Print</a> | <a
href="#" class="lightwindow_action" rel="deactivate">Close</a></div>
   <span class="title">foodname</span>
   <span class="value"><%= food_recipe.food_name %></span>
</div>

I used javascript:window.print(); but this is not the current one for
getting only lightwindow data neglecting the rest in the background

any solution ?

thanks,
sri..
This topic is locked and can not be replied to.