![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Programmer
Join Date: Jun 2007
Posts: 93
Rep Power: 2
![]() |
Printing lightwindow content
for those who don't know what lightwindow is:
http://www.stickmanlabs.com/lightwindow/ Now, my aim is to load up an image, and have a print button somewhere on the lightwindow, so user can print out a single image. My first thought was to have lightwindow load up an external html file with a link, which when clicked runs the following javascript: javascript:window.print(); The problem with this is that it prints both the page in the background and the lightwindow. Now I figured out how i can solve this: consider index.html as the page running lightwindow consider image1.html as the page linking the target image with a link, linking to itself. on index.html, assign the class "lightwindow page-options" to the anchor and have the link pointing to image1.html as per: <a href="coupon1.html" title="Image One" params="lightwindow_width=407,lightwindow_height=330" class="lightwindow page-options"><img src="image1.html"></a> and then on image1.html consider the following code: <body onload="javascript:window.print();"> <p><img src="image1.png"/></p> <p><br><a href="image1.html" class="print">Print This Coupon</a></p> </body> The above solutions works, but i don't like the way it works - I feel there is an easier way I'm missing. Does anybody know any other ways I could go about this? |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PRINTing | hbe02 | C++ | 2 | Mar 30th, 2006 2:47 AM |
| Printing escape sequences using printf()? | bivhitscar | C | 5 | Nov 3rd, 2005 10:08 PM |
| Putting content on Apache Server | Epoch_Apex | Other Web Development Languages | 26 | Oct 26th, 2005 12:01 PM |
| Printing From Printer | Firebirdracer14 | Visual Basic | 2 | Aug 4th, 2005 10:06 AM |