Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Popup size to same width / height, or size to browserwindow


Ozmosis

Recommended Posts

Hello all,

 

I've got a question,

 

For the last few days I've been looking for a way to get the popup (for images / photo's) to open at a predefined size.

 

The images we use in our webshop are quite large in width and/or height, some of them are bigger then the height and/or width of the screens resolution (1280x1024).

 

Now what I would like is that the popup window for images just opens at a predefined size and doesn't get stretched when the image loads in it. This way the user can use the scrollbars (I've already figured out to activate the scrollbars) and scroll over the image in the popup window, while the popup doesn't get weird dimensions with every opened image.

 

I've tried editing the height and width values in the same file where I modified the scrollbars but the images keep stretching the popup window.

 

Thanks in advance,

 

Greetings Oz

Link to comment
Share on other sites

Hey Jay,

 

I'm not sure if I edited my old file or not, but I'll give it a shot.

 

Open catalog/product_info.php

Starting around line 27 you should see -

 

<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=517,height=339,screenX=150,screenY=150,top=150,left=150')

}

//--></script>

 

Change the numbers to what you want your width and height set to.

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

Hey Jay,

 

I'm not sure if I edited my old file or not, but I'll give it a shot.

 

Open catalog/product_info.php

Starting around line 27 you should see -

 

<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=517,height=339,screenX=150,screenY=150,top=150,left=150')

}

//--></script>

 

Change the numbers to what you want your width and height set to.

 

Thanks unfortunately changing these values doesn't keep the window from getting scretched when the image is bigger in height or width. I'm looking for a way to either lock these values, automatically resize the window after the image is loaded or just resize the popupwindow to fill the entire browserscreen.

 

Thanks in advance,

 

Oz

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...