Answered
CFimage action="writeToBrowser" not working in IE?
I'm creating a photo gallery that shows a 3x3 grid of
thumbnails. The code below is in a loop that will display all 9
pictures:
<!--- read img info --->
<cfimage action = "info"
source = "#SiteAttributes.theImgFilePath#\#REPLACE(getPics.Name, '/', '\', 'all')#"
structname = "img">
<cfscript>
dimensions = galleryObj.getResizeDimensions(#img.width#, #img.height#, 175);
</cfscript>
<!--- resize img --->
<cfimage action = "resize"
height = "#dimensions.newHeight#"
source = "#SiteAttributes.theImgFilePath#\#REPLACE(getPics.Name, '/', '\', 'all')#"
width = "#dimensions.newWidth#"
name = "img#getPics.PictureID#">
<cfset picname = "img#getPics.PictureID#">
<td align="center">
<!--- display img --->
<cfimage action="writeToBrowser" source="#EVALUATE(picname)#">
</td>
This code works fine in Firefox, but in IE the images do not show up. When viewing the properties of the image, the path seems to be ignoring where I tell it to get the image, and instead is looking in the directory the current page is in and trying to display 'blank.jpg'. It doesn't show the red X 'image not available', there is literally no image on the page. If I use <img src=""> it also works fine in IE, only cfimage does not. The images are a mixture of .jpgs and .gifs, so I don't think it's a mime type issue.
Thoughts?
<!--- read img info --->
<cfimage action = "info"
source = "#SiteAttributes.theImgFilePath#\#REPLACE(getPics.Name, '/', '\', 'all')#"
structname = "img">
<cfscript>
dimensions = galleryObj.getResizeDimensions(#img.width#, #img.height#, 175);
</cfscript>
<!--- resize img --->
<cfimage action = "resize"
height = "#dimensions.newHeight#"
source = "#SiteAttributes.theImgFilePath#\#REPLACE(getPics.Name, '/', '\', 'all')#"
width = "#dimensions.newWidth#"
name = "img#getPics.PictureID#">
<cfset picname = "img#getPics.PictureID#">
<td align="center">
<!--- display img --->
<cfimage action="writeToBrowser" source="#EVALUATE(picname)#">
</td>
This code works fine in Firefox, but in IE the images do not show up. When viewing the properties of the image, the path seems to be ignoring where I tell it to get the image, and instead is looking in the directory the current page is in and trying to display 'blank.jpg'. It doesn't show the red X 'image not available', there is literally no image on the page. If I use <img src=""> it also works fine in IE, only cfimage does not. The images are a mixture of .jpgs and .gifs, so I don't think it's a mime type issue.
Thoughts?