This whole IE6 mess starts out with PNGs.
I'm not much of an image editor, (okay, fine. I can't crop a picture in photoshop to save my life.) but I do know that PNGs are pretty sweet. Basically they allow varying degrees of transperancy, and really, who can say no to that?
IE6 can!
One of our clients decided that they wanted a gradient in the header of their site. No problemo, we'll just whip up a gradient image and stick it in the background. That was easy enough, but oh wait there's a bit of an issue. There are images that sit on top of the header gradient, and they look pretty fugly seeing as the background colours no longer mesh.
But hey, this is nothing a little transperancy can't fix! Just whip up a few PNGs and... oh, IE6 doesn't support them? Well what a surprise.
This shouldn't have been a huge deal. It says right on the main page of the site that we are optimized for IE7+. Not our fault you're too lazy to hit the "upgrade browser" button. (Yes, I realize that some workplaces may only allow IE6 but really if you're at one of those places maybe you should take that as a hint and not go browsing around on the interweb until you get home ;) Anyway, a quick check on our nifty Google Analytics shows us that 22% of people who visit this site use IE6. Well nuts, I guess we have to make the site look pretty for them after all.
This was actually pretty easy to fix. Just added some Javascript to make it so that the PNGs don't show up looking terrible if the browser detection returns true for IE6. Info on how to do so can be found here: christopherschmitt.com/2007/10/30/png-transparency-for-internet-explorer-ie6-and-beyond/
Of course, we had to test the site in IE6 to make sure this actually worked before sending it off. And it did - but in doing so another problem was discovered. After hitting the site, it would crash the entire browser. Only from the main page, not from any other page.
After some detective work, we figured that it was a couple of Flash pieces on the main page that were causing this crash. Basically these Flash pieces used effects from Flash version 8, and our IE6 browser did not have the right version of Flash.
First of all, we updated to use the SWFObject class instead of the FlashObject class. Then we added this nifty little thing to make it so that if your version of Flash is too low, a message is displayed to upgrade your Flash player, and the Flash pieces do not display unless your Flash version is the same or higher than the version needed to view the files.
Seems like simple logic, but our page was like this for quite a while before we noticed this. So 22% of our clients were coming to the page and it was just crapping out on them. This SWFObject fix is pretty easy to implement and although I haven't worked out all the kinks yet (I can't seem to get the message displaying right inside the flash block, instead a message box just pops up on the screen.) I'll link to where I got the information from. We are currently using SWFObject 1.5 so that's why I find this info helpful, even though the big scary message at the top of the page says it's obsolete. ;)
http://blog.deconcept.com/swfobject/
So clearly the lesson here is: If at all possible, upgrade your browser from IE6! I didn't realize how much I loved tabbed browsing until I had 5 windows open at once.
Oh and one other thing. Just for fun, I tested the site using IE3. It looked like total crap and was pretty hilarious. This started a spiral of me looking at popular sites using IE3. Facebook, Twitter, Google... guess which of the three looked passable :) Oh the days before CSS!
So a little fun bit of backstory. I'm updating a web form at work and basically what it does is allows a user to order some brochures by selecting the quantity of each brochure they'd like to order. Clicking submit takes you through the process of going to an order confirmation screen, inputting your address and finally getting an order complete screen.
Sounds easy enough, right? Well, read on my friends.
I got a change request (oh, I do love the change requests..) to add an out of stock message to the second screen (so the order confirmation screen) saying which brochures are...well, out of stock and will not be shipped until they come in.
So this is basically easy to do. Let's break it down.
1. Find out which brochures are out of stock (this is pulled from the database)
2. Put these items in an array
3. If the array has contents (hey, sometimes the user is smart and orders brochures that are actually in stock! who knew?) they display the out of stock message and list the contents of the array.
Oh joy! We're finished....let's set the task to 100% and...oh wait. There's a button where the user can go BACK to the first screen and change up their order? Shit.
Normally this would have been fine, if the first screen was a part of the multiview. But it's not. It's its own separate weird entity that populates a data table and remembers what the user picked last time they were here. That's pretty neat. It's too bad that the button used to get BACK to this screen does a stupid javascript postback which causes any ASP.NET control which may have to be changed (like maybe... an out of stock message) to be completely invisible to the server because...the postback never gets to the server level.
This form is a beast. Re-writing it would take a ...really long time. The solution? The button no longer does a postback, but clears out the form and forces the user to start over. Not a bad solution. Not a great one but hey, business logic wins again. Because kids, if you can't do it well, at least you can do it fast.
Well, I finally got around to posting to this thing. Shocking, I know. Chalk it up to being extremely busy (or just extremely lazy) over the past couple of weeks. Either way I'm here now and that means this site just got 99% more pink!
I guess I should probably introduce myself. Currently I'm working as a ASP .NET web developer and it's generally a pretty good time. I hadn't used ASP .NET much before so I'm definently learning a lot. Before this I did a bit of contract work for a company using Microsoft Access (never, EVER again!) and I worked as a Technology Consultant while I was in college. Probably the coolest part of that job was developing a seminar on business blogging and how to use blogs/social media to help further your small business. That was pretty neat.
I took Information Systems Technology while in college and picked Database Management as my "stream" or major. As it turned out Web Development became what I was most interested in, but Database was kind of neat too. I leared all about Oracle and then realized that most companies in Winnipeg use SQL Server.
Err yeah. That's about it for my introduction I guess.