Hi - interesting looking script.  Any chance of seeing an example or where
it is used.

Thanks

Peter


-----Original Message-----
From: Mark Flewellen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 8 May 2007 11:12 AM
To: CF-Talk
Subject: Re: image viewer from an CF application

This is the script I use to open a pop up window, this will also refocus the
window if you click on a new image. As well as this if javascript is
disbaled it will just open in a new window. Normally I record the sizes of
the images in the database so when I load a thumbnail it already knows the
size of the image. 

var newWin = null;
function popUp(strURL, strType, strHeight, strWidth) {
 if (newWin != null && !newWin.closed)
   newWin.close();
 var strOptions="";
 if (strType=="console")
   strOptions="resizable,height="+
     strHeight+",width="+strWidth;
 if (strType=="fixed")
   strOptions="status,height="+
     strHeight+",width="+strWidth;
 if (strType=="elastic")
   strOptions="toolbar,menubar,scrollbars,"+
     "resizable,location,height="+
     strHeight+",width="+strWidth;
 newWin = window.open(strURL, 'newWin', strOptions);
 newWin.focus();
}


to then open the image

<a href="linktopagecallingtheimage"
onclick="popUp(this.href,'console',popupheightgoeshere,popupwidthgoeshere);r
eturn false;" target="_blank">



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277216
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to