seso Posted May 2, 2006 Posted May 2, 2006 Hello, I have been pounding my head for days trying to get the "click to enlarge" to work for my customer. Everytime I click on the "click to enlarge" I get a blank window popping up. The window will not have the title of the product and it will have a Done with an exclamation point in the bottom lefthand corner of the window. When I click on the exclamation point, I get the following error: Line: 10 Char: 3 Error: 'document.image.0.width' is null or not an object Code: 0 Here is popup_image.php file in the admin directory: <?php /* $Id: popup_image.php,v 1.18 2003/06/05 23:26:23 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); $navigation->remove_current_page(); $products_query = tep_db_query("select pd.products_name, p.products_image from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'"); $products = tep_db_fetch_array($products_query); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo $products['products_name']; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <script language="javascript"><!-- var i=0; function resize() { if (navigator.appName == 'Netscape') i=40; if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i); self.focus(); } //--></script> </head> <body onload="resize();"> //BOF:Customer Add product <? if (is_file(DIR_WS_IMAGES ."thumb/".$products['products_image'])){$temp="thumb/";}else{$temp=NULL;}?> <?php echo tep_image(DIR_WS_IMAGES .$temp. $products['products_image'], $products['products_name']); ?> //EOF:Customer add product </body> </html> <?php require('includes/application_bottom.php'); ?> If any one can help me it will be much appreciated. I know it is probably something simple, that I can't figure out. I'm using the latest version of Oscommerce and CAP 1.4. Thanks Seso
seso Posted May 3, 2006 Author Posted May 3, 2006 I figured it out. I placed the two popup_image.php in the wrong directory. After they were mixed up, I edited the wrong one. Seso :-"
Recommended Posts
Archived
This topic is now archived and is closed to further replies.