Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Need a Java Popup Button for Printable Invoice


Recommended Posts

I am trying to make a javascript button to launch a popup window without url bar (to display a printable invoice with no order number in the url bar). I am not proficient at java, and have not been able to get it going right, so I am looking for help. This is the original link:


<?php echo '<a href="' . tep_href_link(FILENAME_ORDERS_PRINTABLE, tep_get_all_get_params(array('order_id')) . 'order_id=' . $HTTP_GET_VARS['order_id'], 'SSL') . '" TARGET="_blank">' . tep_image_button('print_button.gif', IMAGE_BUTTON_PRINT_ORDER) . '</a>'; ?>


Thanks in advance!

Link to comment
Share on other sites

  • 2 weeks later...

Hi there....


For a specific gastronomic project, my client requested me to prepare printable pages for each and every available menu. I have two possibilities :



1. I click a button, which opens a pop-up window without Location, Menubar,...


<script language="javascript"><!--

function popupWindow(url) {





<?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_ORDERS_PRINTABLE, tep_get_all_get_params(array('order_id')) . 'order_id=' . $HTTP_GET_VARS['order_id'], 'SSL') . '')">' . tep_image_button('print_button.gif', IMAGE_BUTTON_PRINT_ORDER) . '</a>'; ?>


2. Inside the code of the page to be printed, I put this :


<div id="print" style="position:absolute; left:285; top:45; visibility:visible; z-index:0;"> 

<A HREF="javascript:window.print()"><IMG SRC="images/print.gif" ALT="Print Menus" BORDER="0"></A>



This puts a "Print" button on that page that I can click to launch the printing.



1. I click a button, which opens a pop-up window without URL, Menubar,...

(same code as above).

2. Inside the code of the page to be printed, I put this :


<BODY onLoad="window.print();">



This automatically launches the printing (i.e. open the printing dialog box...) at the openning of the pop-up window.


I hope this helps.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...