You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
I know I can specify the size of the popup and then resize the images to that one size, but I would like to set it up so the popup automatically fits itself to the image's size.
I went through pages of search results and couldn't find much on this, anyone know if this is possible? Thanks.
Offline
Read this thread :
I'm sure this will answer to your question.
Offline
What I'm aiming to do is exactly what WayneK has done . The popups automatically fit themselves to the image's size.
I even tried the code he posted in the thread above, but I couldn't get it to work the way he did. Can someone help me with this before I message WayneK? Thanks.
Offline
bump
Is this possible without using Image Magick?
Offline
There will be no effect if you apply this MOD without image magik.
Offline
I've found a solution that doesn't require Image Magick!
It was mentioned in this thread:
Works beautifully. I replaced a couple of things in the script with CCP variables, like automatically inserting the product_name in the title. Try it out... works great! All I had to do was replace the element "Extra Large Product Image Link (ste_prdlg_popup)" with this:
<!--begin here-->
<script language="Javascript">
PositionX = 200;
PositionY = 200;
defaultWidth = 720;
defaultHeight = 720;
var AutoClose = true;
// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();
}}
</script>
<a href="javascript:popImage('(CGIVAR)popup_image_url(/CGIVAR)','(CGIVAR)product_name(/CGIVAR)')">
<img src="(CGIVAR)image_url(/CGIVAR)" WIDTH="(CGIVAR)store_large_image_width(/CGIVAR)" BORDER="0">
</a>
<!--end-->
Offline
Has anyone tested this script with Safari? I can't seem to get it to work in Safari based on the demo here
Thanks,
Thekiko
Offline
In this case, you might want to try this one :
Offline