Click to See Complete Forum and Search --> : [RESOLVED] IE displaying transparent PNG and broken image at the same time


gnetcon
08-18-2006, 04:00 PM
I have a page that shows several layers that can be turned on/off using checkboxes and Javascript. The page works fine in Firefox, and I got the PNG's to display properly in IE. My problem is now the layer will display, but it also displays a broken image marker, too! It's bizarre.

Please see the attachments for examples. Any ideas? I'm stumped.

TIA!

WebJoel
08-18-2006, 04:10 PM
That is odd. But we'd need more than just viewing these images. -Got code or URL?

gnetcon
08-19-2006, 03:21 PM
Good idea. Here's the script in action:

https://dev.enable-us.com/ahps3/index.php?wfo=iln

gnetcon
08-29-2006, 12:32 PM
I found the problem. I was using a fix that included a .htc file that was fixing the layers. That solution could be found here:

http://webfx.eae.net/dhtml/pngbehavior/pngbehavior.html

But, as I watched the pages get created, I noticed it was displaying both the fixed copy, as well as the broken copy. So I updated the code to use a different fix found here:

http://homepage.ntlworld.com/bobosola/pnginfo.htm

I used the solution that calls the function instead of going through all of the images on the page. Used in:


<div id="image1"><img name="img1" style="z-index:1" src="counties_map.png" width="560" height="473" alt="County Overlay" onload="fixPNG(this)" /></div>


Now the pages display fine in all browsers.

I hope this helps someone else down the line.