I have this code written to show an image that is uploaded to my "home page" and display it on all child pages. It works great in FF but it is a broken image in IE, has to be something simple I am over looking. Any help would be great.
Code:
[code]
[/code]
Like I said it works perfectly in FF but is a broken image in IE
It can also provide a way to test on urls etc if needed.
I did, however, recently run into a problem like yours: Not all the images that the customer had uploaded was displayed. So, after checking that the image was really there, that the src was correct and all, I checked the image format. Turned out that some of the images were in CMYK format and not RGB. CMYK is used for printing, not for computers but companies sometimes include images in these formats as the people in the PR departments normally do not know the difference.
Firefox is not aware of the difference neither, so it happilly displays both, but IE does not. So, if your code is working, try checking the image format
Weird IE problem displaying my image...
I have this code written to show an image that is uploaded to my "home page" and display it on all child pages. It works great in FF but it is a broken image in IE, has to be something simple I am over looking. Any help would be great.
Code:
[code]
[/code]
Like I said it works perfectly in FF but is a broken image in IE
Try changing this...
<img src="{$rootNode/data[@alias='companyLogo']}" />
to this...
<img src="http://{$rootNode/data[@alias='companyLogo']}" />
If that doesnt work, output this and see what it says
<xsl:copy-of select="$rootNode/data[@alias='companyLogo']" />
If that won't work please provide the source generated by your xslt.
Ron
ps. You might want to consider adding an alt attribute for accessibility.
I normally use the following when I add images - in parts because I tend to swap between thumbs and the real size image:
<xsl:variable name="SiteURL" select="concat('http://',umbraco.library:RequestServerVariables('HTTP_HOST'))"/>
<xsl:variable name="photo" select="umbraco.library:GetMedia(current()/data[@alias=photo], 'false')/data[@alias='umbracoFile']"/>
<xsl:variable name="photoThumbnail" select="umbraco.library:Replace($photo, '.jpg','_thumb.jpg')"/>
<img alt="" src="{$SiteURL}{$photo}" ></img>
It can also provide a way to test on urls etc if needed.
I did, however, recently run into a problem like yours: Not all the images that the customer had uploaded was displayed. So, after checking that the image was really there, that the src was correct and all, I checked the image format. Turned out that some of the images were in CMYK format and not RGB. CMYK is used for printing, not for computers but companies sometimes include images in these formats as the people in the PR departments normally do not know the difference.
Firefox is not aware of the difference neither, so it happilly displays both, but IE does not. So, if your code is working, try checking the image format
is working on a reply...