Well, that took only half a day of fiddling...
Since the Windows XP Service Pack 2 includes a significant update to the Tablet PC part, one of the first things I installed when my tablet finally arrived was installing the SP2 public preview (RC2 at the time). I noticed a few bugs, and was happy to see most of them gone in the RTM version I am running now.
One of the odd things I noticed was that SP2 broke the transparency of my PNG files. I am using a HTC component to properly display PNG transparancies on a couple of websites. The neat thing about this approach is that it requires only a single reference to a CSS file, and there is no additional scripting that could confuse other borwsers. However, after installing SP2, transparency was gone.
Looking around on the web I soon found out that simpler javascript hacks still worked ok, so Microsoft hadn't decided to kill the AlphaImageLoader filter that does the magic. So far so good. On the other hand, none of the sites that offered a PNG fix HTC seemed to work anymore. Looking further at http://webfx.eae.net/, I noticed that none of their HTC components worked anymore, see for example their very usefull *cough* blink component. Bummer. Did Microsoft kill the entire concept of HTC behaviors?
Looking further, I came across the most ambitious HTC project I know of: Dean Edwards' attempt to fix all current CSS problems in IE. While his PNG workaround demos seem to have some quirks, most of his fixes, implemented in HTC's worked just fine. So it wasn't just the CSS behavior mechanism that got hosed in SP2.
When I tried to get Dean's package to work from my webserver, non of his fixes seemed to work. Not from my servers, but on his, they work fine. The exact same files, the exact same browser. Argh!
Back to some of the other Service Pack 2 bugs, or features if you are so inclined. I guess someone decided that in orded to increase security, IE now has to be really strict about mime-types. I notcied on some of the weblogs I visit, just clicking on a link to an asf would often no longer open media player as we have all come to get used to. If the mime-type is not properly configured, you're getting the file as text/plain. Or as it turns out text/jibberish. IE is nice enough to warn me that the file might not display properly.
See the link with the HTC problem? The exact same files, the exact same browser, different mime-type. HTC files are now required to be of mime-type text/x-component, or they just won't work! Dean Edwards already tells us that we really should use the proper mime-types (near the bottom of the page), but many other people haven't done so.
Comments
Re: HTC components in XP Service Pack 2
For those who tried all of this and still have no working .htc component in IE7.0 SP2:
- Insert full doctype declaration for your page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >
or
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Sometimes people use short version like <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" > which is not valid.
- Change mime to text/x-application:
<meta http-equiv="content-type" content="text/x-application; charset=UTF-8" >
After all problems I had I can say: I hate MS.
Re: HTC components in XP Service Pack 2
Yep, I hate MS too. At least IE. I can not get it to work with IE 6 on a local machine; no webserver at all. All my CSS is internal to my HTML file and the .htc file is in the same directory as the HTML file. At first I was getting an error saying that permission to access the .htc file was denied and I took the advice of JS and added the "./" to the file path so it looked like body { behavior:url(./csshover.htc); }, and the error about access denied went away, but it still does not open the menus and retunrs no error.
Re: HTC components in XP Service Pack 2
I Have the following Problem.
My webservice was working fine.
Suddenly i get the following Message without changing anything
Error type: Client Fault string=HTC Internal error
Re: ?
Hi, can you explain please how can I change the mime-type for IE on XP SP2? I ll appreciate that. ..
Re: ?
It's something that needs to be changed on the webserver, not on your system. Or are you running a webserver on your XP SP2 machine?
Re: HTC components in XP Service Pack 2
Change the doctype to
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
instead of
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
and the drop down menu now works in ie7.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
instead of
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
and the drop down menu now works in ie7.
Re: HTC components in XP Service Pack 2
I am trying to get this htc.css to work in IE6 SP2. It seems to work but ignores the z-index. I have photographs of individuals that when you rollover, expand and reveal more text. The text appears but I can tell from this that the htc.css is ignoring the z-index.
my page http://dev-westfield.virtualhorizons.com/careers/work_westfield.jsp
I tried a couple of the suggested solutions but to no avail. My htc.css is in a include folder.
So in my stylesheet I have
body {
behavior:url(../include/csshover.htc);
}
any suggestions? Works great in IE7, FF2.
Re: HTC components in XP Service Pack 2
I have one of the first HTC pocket pcs. its an HTC 2900 and the windowa mobile package on it is so slow. my phone freezes up a lot and I was wonderin if there was any way I could get a new windows package or somethin to make my phone run better and faster.
Re: HTC components in XP Service Pack 2
Fantastic post. Bookmarked this site and emailed it to a few friends, your post was that great, keep it up.
Pages