[ic] Try this pop-up script

Alex Lam alex@integricity.com
Fri, 23 Feb 2001 18:52:35 +0800


Hi, fellow Akopians...

In keeping with sharing of codes, here's a script that allows you to
have the "Click here for bigger picture" feature on your site.

All you have to do is, add a field in your product table called
bigpix.

Then paste this in flypage.html, under the area where the image
appears :

[if-item-field bigpix]
<a href="/cgi-bin/store/scan/fi=products/sf=sku/se=[item-code]/sp=bigpix" onclick="NewWindow(this.href,'Picture','600','400','yes','center');return false" onfocus="this.blur()"><font face="__FFACE__" size="2">Click for bigger picture</font></a>
[/if-item-field]

Then, add this to the top of flypage.html :

<script language="javascript" type="text/javascript">
<!--
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
win=window.open(mypage,myname,settings);}
// -->
</script>


Do let me have some feedback on this!

ADIOS!

Alex Lam
Integricity Corporation