Well, now that I've posted all kinds of code... I actually dont see a
problem with your original code in IE other that I believe you may have been
calling the FitPic() to early... This works.
<html>
<head>
<script type="text/javascript">
var arrTemp=self.location.href.split("?");
// var picUrl = (arrTemp.length>0)?arrTemp[1]:"";
var picUrl =
'http://65.36.226.10/images/reelcolors/canyon/CanyonBigGame_front_gold.jpg';
var NS = (navigator.appName=="Netscape")?true:false;
function FitPic()
{
iWidth = (NS)?window.innerWidth:document.body.clientWidth;
iHeight =
(NS)?window.innerHeight:document.body.clientHeight;
iWidth = document.images[0].width - iWidth;
iHeight = document.images[0].height - iHeight;
window.resizeBy(iWidth, iHeight);
self.focus();
};
</script>
</head>
<body bgcolor="#000000" topmargin="0" marginheight="0" leftmargin="0"
marginwidth="0">
<script type="text/javascript">
document.write( "<img src='" + picUrl + "' border=0>" );
FitPic();
</script>
</body>
</html>
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-----Original Message-----
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 22, 2005 10:05 PM
To: CF-Talk
Subject: RE: js popup ? damn that ie!!!!!
Ehhh here it is for the entire world to enjoy and marvel in its magnificence
and extreme complexities... lol
It's so complex I didnt even remember how to use it (and I wrote it lol)
Its not a tag... its a function...duh
So you would use this instead of the previous customtag syntax
#bhimginfo(images[i])#
Then you'd have the whole bhimageinfo structure to play with.
Ps... bhImageInfo.width should be bhImageInfo.ImgWidth in the previous
message (same with height)
<!---------------------------------------------------------------->
<cfscript>
/*
Filename : bh_imageinfo.cfm
Date Created : 04-23-2005
Author : Bobby Hartsfield | [EMAIL PROTECTED]
Description : This is an image function to read basically any and
all attributes of an image file.
The majority of the returned information is
commented out because in most cases
I have had no need for anything other than
the basics (ie. height, width, file size, etc..)
Feel free to use or modify it however you
see fit. Just because I typed the keys
doesn't mean I own that particular sequence
of keys!
*/
function bhimginfo(imgfile){
jFileIn = createObject("java","java.io.File").init(imgfile);
ImageInfo = StructNew();
ImageObject =
createObject("java","javax.imageio.ImageIO").read(jFileIn);
imageFile = CreateObject("java", "java.io.File");
imageFile.init(imgfile);
sizeb = imageFile.length();
sizekb = numberformat(sizeb / 1024, "999999999.99");
sizemb = numberformat(sizekb / 1024, "99999999.99");
bhImageInfo = StructNew();
bhImageInfo.ImgWidth = ImageObject.getWidth();
bhImageInfo.ImgHeight = ImageObject.getHeight();
bhImageInfo.SizeB = sizeb;
bhImageInfo.SizeKB = sizekb;
bhImageInfo.SizeMB = sizemb;
// You can get much more info from the file that you may or may not find
useful.
// Just uncomment any of the sets below to see what goodies turn up
// Just cfdump bhImageInfo to see the results
// bhImageInfo.ImageFormat = ListLast(ListLast(imgfile, "\"), ".");
// bhImageInfo.ImgtoString = ImageObject.toString();
// bhImageInfo.ImggetType = ImageObject.getType();
// bhImageInfo.ImggetData = ImageObject.getData();
// bhImageInfo.ImggetPropertyNames = ImageObject.getPropertyNames();
// bhImageInfo.ImggetGraphics = ImageObject.getGraphics();
// bhImageInfo.ImggetColorModel = ImageObject.getColorModel();
// bhImageInfo.ImggetMinTileX = ImageObject.getMinTileX();
// bhImageInfo.ImggetMinTileY = ImageObject.getMinTileY();
// bhImageInfo.ImggetMinX = ImageObject.getMinX();
// bhImageInfo.ImggetMinY = ImageObject.getMinY();
// bhImageInfo.ImggetNumXTiles = ImageObject.getNumXTiles();
// bhImageInfo.ImggetNumYTiles = ImageObject.getNumYTiles();
// bhImageInfo.ImggetSampleModel = ImageObject.getSampleModel();
// bhImageInfo.ImggetSources = ImageObject.getSources();
// bhImageInfo.ImggetTileGridXOffset =
ImageObject.getTileGridXOffset();
// bhImageInfo.ImggetTileGridYOffset =
ImageObject.getTileGridYOffset();
// bhImageInfo.ImggetTileHeight = ImageObject.getTileHeight();
// bhImageInfo.ImggetTileWidth = ImageObject.getTileWidth();
// bhImageInfo.ImgcreateGraphics = ImageObject.createGraphics();
// bhImageInfo.ImggetRaster = ImageObject.getRaster();
// bhImageInfo.Imghashcode = ImageObject.hashCode();
}
</cfscript>
<!---------------------------------------------------------------->
...:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-----Original Message-----
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 22, 2005 9:51 PM
To: CF-Talk
Subject: RE: js popup ? damn that ie!!!!!
Ehhh... that was my quick and easy solution heh.
You can put the images into a query object, array or structure...so you can
loop them out into links or just call them easily and run them through an
image tag (I have one I'd send you that only grabs basic info like width and
height... which is all you need here but it gets some other stuff as well.)
So something like....
<cfset images = arrayNew(1) />
<cfset arrayappend(images, "image1.jpg") />
<cfset arrayappend(images, "image2.jpg") />
<cfset arrayappend(images, "image3.jpg") />
<cfset arrayappend(images, "image4.jpg") />
<cfset arrayappend(images, "image5.jpg") />
<cfset arrayappend(images, "image6.jpg") />
Then loop over that to output the images and run them through a image tag...
<cfloop from="1" to="#arraylen(images)#" index="i">
<bh_ImageInfo file="#path#\#images[i]#" />
<a href="javascript:void(0);" onclick="
popup('#request.homepage#/images/reelcolors/canyon/#images[i]#',
'#bhimageinfo.width#', '#bhimageinfo.height#');return false;>my image</a><br
/>
</cfloop>
(or you could output them manually, with #Images[1]#, #images[2]#, etc...
where ever you needed them and just run the imagetag just before it.)
......and the js....
<script type="text/javascript">
function popImg(url, w, h)
{
NewWindow=window.open(url,'Title','width=' + w + ',height=' + h +
',left=400,top=200,toolbar=No,location=No,scrollbars=No,status=No,resizable=
No,fullscreen=No');
}
</script>
If your interested in my tag let me know and ill send it your way.
....:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.5/177 - Release Date: 11/21/2005
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225051
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54