Unitpngfix problem on Vista


Up to this point, I have successfully deployed the unitpngfix described here: http://labs.unitinteractive.com/unitpngfix.php.  The only place it is *seems* to cause a problem is on my hp laptop which is running Vista Home Edition 64bit.

The problem is that any .png with transparency AND the background image which is NOT transparent do not appear.  If I remove the following conditional statement from a page:

<!--[if lt IE 7]>
        <script type="text/javascript" src="unitpngfix.js"></script>

all transparent .pngs AND the background image (again not transparent) appear as they should.  If I replace the conditional statement, they disappear again.

I have done the following to resolve this issue:

1) checked the path to the clear.gif in the unitpngfix.js; it is correct
2) replaced all files used in the unitpngfix to in case any were corrupted; problem persists.
3) I have tested this site in XP and Server 2003 in IE6 using IEtester and it works as it should; the only place it does NOT work in IE6 is on my laptop running Vista Home Edition 64bit.

Unfortunately, I have no other machine running Vista Home 64 bit or any version of Vista along with an installation of IE6 for testing to see if I am able to replicate this problem elsewhere.  For that matter, I wonder: how many machines which are running any version of Vista would also be running IE6?  It seems to me that would be highly unlikely.

Please let me know if you need more information to troubleshoot this issue.  I would post code and .pngs but my thought is anyone out there that has a development environment should be able to test this using any .pngs and some markup.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hmmm, Vista doesn't come with IE6, does it? I'm a little rusty on these matters since I've moved away from windows, but I'm pretty sure Vista came with IE7, right?

Now depending on the 'install' you used to get IE6 to run in Vista, there's a mighty good chance that it's crippled and running the standard scripting engine, which is to say, the one that comes with whatever latest version of IE is installed (IE8? or at least IE7). The result is that your conditional statement is incorrectly identifying your browser as being IE7 or greater. Since you're trying to check for less than IE7, the statement returns false and doesn't run unitpngfix!

To resolve
a) test on a clean windows installation with IE6 installed as the main browser, see if problem persists.
b) Test your conditional statements to identify which browser your browser thinks it is.

I would really advice on using a Virtual Machine environment to test your browser compatibility. I have a single VM with multiple versions of IE, but for any version-related tests I always double-check with a safe VM that only runs a single IE version!

Hope this helps,

max7Author Commented:
Hey Marin, thanks for the guidance.  I'm going to work on this between tonight and tomorrow and will let you know how it works out.

>>>I would really advice on using a Virtual Machine environment to test your browser compatibility.

I have considered this but to be honest, I am mostly clueless on how to setup a virtual machine on my computer.  I know this kinda steps out of the scope of this question but if you could send me a link to a "dummies" guide on how to set this up, I would be eternally grateful :)  Otherwise, I will post a new question later.
Well, I can't say I know of a dummy guide, but I've found that VirtualBox runs pretty well (http://www.virtualbox.org/), it's free too, which could be a bonus ;)
Otherwise I have a good experience using VMWare, although on the Mac this may be a more gratifying experience than what it is on PC's?

Essentially the gest of the concept is:
Hi Max

1) Install a Virtual Machine Manager (VMWare, VirtualBox, VirtualPC?)
2) Use that manager to 'build' a new Virtual Machine.
3) Install an OS on the Virtual Machine

Alternatively, if your a windows user, there's test-VM's available from Microsoft. These run in VirtualPC and are time-limited, which means you'll need to re-aquire them every now and again. However, they are the officially legal way to run Windows in a VM, where installing windows with the same key as your Host-machine is officially illegal ;)

Hope this helps, if not I'd recommend asking a question in the appropriate topic, there being more knowledgable techies out there ;)

Good luck!

Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

max7Author Commented:
>>> but I'm pretty sure Vista came with IE7, right?

I believe this is correct since I've found at least one article which confirms this.

>>>To resolve
a) test on a clean windows installation with IE6 installed as the main browser, see if problem persists.

Do you mean to reload the Vista OS on my laptop?  Pardon my ignorance but this sounds like quite a project?  Perhaps using a virtual machine will produce the same results?
Well, reloading Vista is probably not going to help, that would come with IE7 pre-installed! You need a machine that does not have a version of IE later than 6! There's no ignorance involved, lacking a machine that only has IE6 installed the logical step is to build a virtual machine, so you've basically come to the right conclusion.

I only suggested a freshly installed machine with IE6 because a lot of tech-related people have some old machine lying around on which they can install Windows XP from an old CD they have lying around :) Also, I wanted to stress the point that running IE6 besides IE7 or 8 is 'unsafe'.
max7Author Commented:
>>>I only suggested a freshly installed machine with IE6 because a lot of tech-related people have some old machine lying around

Yes, reasonable assumption and I'm slowly working up to that! :)

>>>Also, I wanted to stress the point that running IE6 besides IE7 or 8 is 'unsafe'.

What is unsafe about it?

Fyi, I've tested out changing the conditional statement and it seems that when I change it to lt IE 6, the images will re-appear but the unitpngfix will not work and the .png images will not appear transparent.  When I use lt IE7 or above, the unitpngfix will work everywhere including IE6 except on the Vista machine.   Does this tell us where the problem lies?  Do you need more specific information and testing from me?
The problems you are having are directly related to what I mean with 'unsafe'. The explorer rendering engine and related components (such as the scripting engine) are core components of windows. This is the reason that Microsoft does not enable us to run multiple versions of Internet Explorer on the same machine, this is officially not possible.

Some people have figured out ways to get around this problem by containing all the required components and the executable for a single Internet Explorer version into a single directory. The problem is, if something is done wrong in this setup (a component is overlooked for instance), your self-contained Internet Explorer is no longer 'self-contained'. Instead it will borrow it's missing component from the default version installed on your machine.

So we come back to your situation. Internet Explorer 7 is the default installed browser. IE6 is supposed to be running stand-alone. However, the scripting engine is not configured correctly, or perhaps an essential Registry tweak is not installed, and the scripting engine therefor defaults back to the default install which is IE7. Since your conditional comments run in the scripting engine, they think you're running IE7 and fail to work as you expect them to.

What you're running into is the most common problem with stand-alone IE6 installations but I've seen other similar problems as well, which is why I always test with a separate VM if I get seemingly 'impossible' errors on my multiple IE VM.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
max7Author Commented:
Alrighty then!  Thanks so much for casting light on this issue for me.  I'm off to create my first VM ....
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.