Obviously I am doing something wrong, because that script along with all
the rest do nothing. All the famfamfam icons along with a couple of
custom png files all show the gray. I have put in some annoying alerts
to see if the scripts are being called, which they are.
Most of the scripts require a blank.gif file, which I have in the
/images folder.
All the demos on the sites that I download from work great, so it's not
my browser.
Thanks for the help
Why can't the people capable of writing viruses focus on destroying all
the computers out there running ie6?
I can get things working in a bare bones example using ifixpng, but in a
rails project it no longer works. I am not sure if the paths used in
the javascript code are incorrect when running on a server or ...?
@Nathan
Unfortunately, that one only seems to work on the image_tag method. I
have a number of background images that need fixing. Thanks though.
The reason was that rails appends the ?XXXX to images to allow the
caching of the files to be controlled. The jQuery filter was looking to
png files that ended with the .png extension, which then never found any
of the images on the page.
- open up the htc file, and change the (transparency) image path to
an *absolute* path that points to where you have put your file
- create css rules that apply the htc file to images
My stylesheet is called style_ie_6.css, and contains:
This will apply the png fix to anything with a class of pngfix
(including things with background images). I include my stylesheet in
my rails project like so (in the head of the master layout):
let me know if this helps, but it has worked great for me, so it does
work with rails!
Since I am still unable to get bg images to work I figured I would try
the helix one again. After I was still unable to get it to work I
checked out the javascript code and found the same issue with it as I
did with the last.
if (tagName == 'IMG')
{
if ((/\.png$/i).test(src))
{
if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
style.width = offsetWidth + 'px';
filt(src, 'scale');
src = blankImg;
}
else if (src.indexOf(blankImg) < 0) filt();
}
...
The line
if ((/\.png$/i).test(src))
once again contains the reg expression that requires the src file to end
with the png extension. After making the fix, like the other lib that I
got working, still doesn't fix bg images, which was seen after placing
an alert just after:
46: else if (bgImg && bgImg != 'none')
The jQuery lib that I got working was noticeably faster so I will stick
with that one.
I remember seeing this problem at some point, I think it was fixed
though. The regexp in my copy looks completely different:
if ((/\.png([^\.]+|$)/i).test(src))
there is also another regular expression in there for background images:
var bgPNG = bgSrc.match(/^url[("']+(.*\.png[^\)"']*)[\)"']+[^\)]*$/i);
I think I am using the preview release (which has worked without any problems).
I understand what you're going through right now! I tried a bunch of
different png fixes and after getting each working i found weaknesses
with most. E.g. not working with background images or having to add
sizes/dimensions to the pngs. Although, I didn't try the jquery one,
because I didn't want to have to make prototype and jquery play nice
together. So it might be great!
I gave the beta version a go and it works nicely Thanks for posting
even after I seemed to have settled on one of the other options. That
is a huge weight off my shoulders.