Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Enlarge Image Not Right


CreoleTech

Recommended Posts

Posted

I'm working on a website for a client and their laptop's resolution is 1200 x 600.

 

When they click on englarge image, the picture pops up but 1/5 of it is below the screen, you can move it to the center of the screen, but then you have to resize the box to actually see the entire picture. I thought I had fixed this by adding a <br> and .... to , but it' not working still.

 

I've attached the script below, if anyone could help I'd appreciate it. Is there a way to get scroll bars in case it needs it?

 

<?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 © 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();">

<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?>

<br><br>

</body>

</html>

<?php require('includes/application_bottom.php'); ?>

 

 

Thanks,

 

Creole

Posted

Creole,

 

There are a couple of answers to your posting here.

 

First of all you control the size of the images that display in your store in Configuration / Images. It's best to put as few values as you can get away with - meaning if you have zeros under all values except for "Small Image Width" your images will appear in their original size. This is the best choice for the best image quality. Just make sure the images you upload are less than 600 pixels in height.

 

Which brings me to my second thought about this. Your customer is running a very unusual screen resolution. 1200 x 600 is wide, but not very high. Definitely less high than the average screen resolution that most people use.

 

Please refer to this article:

http://www.w3schools.com/browsers/browsers_stats.asp

 

1024 x 768 is a good resolution to target the size of your websites. For this resolution, your imges might be ideally suited.

 

In other words, just leave things the way they are.

 

Just my $0.02

 

Pete

Archived

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

×
×
  • Create New...