Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Popup or a windows?


bibleman

Recommended Posts

Posted

Got a question someone may can answer

 

1) This code opens a window that is a popup. It makes the file popup inside of a window that is perfectly sized for the information

 

<a href="java script:popupWindow(\'' . (HTTP_SERVER . DIR_WS_ADMIN . FILENAME_ORDERS_PACKINGSLIP) . '?' . (tep_get_all_get_params(array('oID')) . 'oID=' . $HTTP_GET_VARS['oID']) . '\')">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a>

 

 

2) This code opens a window but the window is much bigger than the information that fits into it.

 

$contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a>');

 

Got any idea how you would make the second window popup like the first window?

 

Thanks

 

Leon

I'm having a great Day - hope you are too!

 

Leon

Posted

I can't help answer your question but I would like to remind you that pop-up blockers are HUGE now a days, they come on almost every browser. You may want to rethink using pop-ups. Just my humble opinion.

 

-------------------------------------------

Above post comprised entirely of opinions ? Pauline. Cash value ?0.02 Not redeemable in all stores. Check my website for full terms and conditions. Opinions come with no warranty either expressed or implied.

Posted

On the page you want to adjust the size of, insert the following code:

 

 

In between the <head> tags:

 

<script language='javascript'> 
function Shrink() { 
?self.resizeTo(500,400)
}; 
</script>

 

Note the 500, 400 in the code above, this is the height and width of the window size. You get to choose it there.

 

And then on the <body> tag for that page add the following to make it:

 

<body marginwidth="10" marginheight="10" topmargin="10" bottommargin="10" leftmargin="10" rightmargin="10" onload="Shrink();">

Posted

Thanks

 

Both of you gave me some good advice.....

 

I'll give the code a try.

 

Thanks again

 

Leon

:rolleyes:

I'm having a great Day - hope you are too!

 

Leon

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...