jQuery Advice For Dealing With Stupid Internet Explorer

It feels so good getting rid of that many long Javascript lines, sorry, ECMAscript, and playing with some jQuery and DOM. Well, at least until you meet with that browser which ignores so many web standards: Internet Explorer, unfortunately still used by a big bunch of naive users who don't know there are way better options out there.

This week I had to modify a lot of jQuery code to get it working with that horrible browser from Redmond. And the job is even harder without a tool like Firebug. Internet Explorer just spits a line number when there's an error, often without a file name, or just cryptic messages.

I refuse to install any other Microsoft application just to debug their errors, I prefer thinking, changing some code and seeing if line numbers change. It's a very old fashion way of debugging but it works.

One of the problems I found while working with Internet Explorer and jQuery involved using the html() method to change some element's content. I was able to solve this by modifying some parent() or even using remove() and then append() or after() (see jQuery docs). However, I haven't found any logic for most of these issues yet, in some cases html() worked but quite often Internet Explorer died showing a run time error.

Also, while designing a jQuery enabled calendar using an HTML table I realized that correctly using thead and tbody could make a difference. It's better to have a correctly structured table to avoid Internet Explorer complaining.

Making your web application run with Internet Explorer is not an impossible task but takes a good amount of time and can make you think about killing yourself while listening to a Steve Ballmer interview, yeah, that horrible.

I guess that many web developers, like myself, are already thinking on increasing their fees when some job requires dealing with Internet Explorer, not a bad idea, really.

We Need Standards For HTML Email

I've been using Campaign Monitor for a long time and I've just started working with them to improve the Drupal module I wrote a few months ago.

David Greiner and everybody at Campaign Monitor are doing a great job, specially promoting the use of web standards for email, and that's why I'm writing this article. We, professional web developers, must work to get email client vendors to fully support standard HTML and CSS in their products.

At 456 Berea St. Roger Johansson has already made the same call and I totally agree with him.

So, what you're waiting for? You can start by helping to define a baseline to support web standards in email.