Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Pop Up Not Working Anymore


xhidex

Recommended Posts

Somebody have an idea to what happen?

I just add some products and now the pop up for make the image bigger is not working anymore...anyone have an idea?

http://www.alpeda.ch

thanks!!

 

p.s. this is my code of popup_image.php

 

<?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>
<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();">
<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?>
</body>
</html>
<?php require('includes/application_bottom.php'); ?>

Link to comment
Share on other sites

The following script is missing in the head from your product_info.php page:

<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}
//--></script>

Link to comment
Share on other sites

The following script is missing in the head from your product_info.php page:

<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}
//--></script>

I find this code in the body

<script language="javascript"><!--
document.write('<a href="java script:popupWindow(\'http://www.alpeda.ch/cms/catalog/popup_image.php?pID=1674\')"><img src="images/211009.jpg" border="0" alt="Seggioloni in legno" title=" Seggioloni in legno " width="100" height="80" hspace="5" vspace="5"><br>Clicca per allargare la finestra</a>');
//--></script>

<noscript>

 

is not the same? how can I add in the header? thx a lot!!

Link to comment
Share on other sites

No it is not the same, you have to put the code I posted before the closing </head> tag in the product_info.php file (or if you use a template file, in there).

 

This is the actual javascript function, what you see in the body is a call to this function, but since the function is missing in your page(s) nothing happens when clicking the image.

Link to comment
Share on other sites

No it is not the same, you have to put the code I posted before the closing </head> tag in the product_info.php file (or if you use a template file, in there).

 

This is the actual javascript function, what you see in the body is a call to this function, but since the function is missing in your page(s) nothing happens when clicking the image.

 

Can you check now? I have added but it still not working yet...sorry if I bored you!!

Link to comment
Share on other sites

In your code there is a return after: scrollbars=no,res and the closing </head> tag is missing.

<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,l
eft=150')
}
//--></script>

 

Be sure this line does not contain a return (although in this box it does):

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')

 

And add a closing </head> tag after the script

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...