Kilg.us – Fantasy Stat Tracker …Tracker

A blog about the development of Kilg.us – The Fantasy Baseball Stat Tracker

Benching Players in Internet Explorer

I received reports that some Users were unable to Bench players. No surprise, those Users are using Internet Explorer (7 and 8). Why “No surprise”? For those who don’t know, Internet Explorer has long been a pathetic attempt for a web browser. The rendering engine is miserable (although, admittedly better in IE7 and better yet in IE8) and the JavaScript engine is slow and broken. As such, Kilg.us is never tested on IE. Development occurs with Firefox. If I need to test multiple accounts, I’ll use Chrome or Safari as well. So, if something doesn’t work in Kilg.us, try a real browser and you’ll likely have better luck.

Because I’d rather have more people use Kilg.us, though, if you experience issues in IE and let me know about them, I’ll try to get them fixed. I’ve had two reports this Spring and both have been fixed within 24 hours. I can’t promise that speed all the time, but I try.

Today’s issue specifically had to do with the “class” attribute. See, with every real browser, you can access the “class” attribute by using the name “class” (just like you access the “href” attribute with “href” or the “style” attribute with “style”). So this is how Kilg.us was referencing the “class” attribute value to determine if a player was benched or not. In IE, though, you reference the “href” attribute with the word “href” and the “style” attribute with the word “style”…but the “class” attribute is accessed with the word “className”. It’s the only attribute like that. Thank you Internet Explorer.

To fix the problem immediately, I had to implement a standard check to see if the browser was IE and if so use “className” instead of “class”. That fixed the problem, but further confused what was already an unelegant function. So the long-term solution was to rewrite the entire function utilizing some JQuery class-manipulation functions to perform the desired action.

Long story short, you should be able to bench players in Internet Explorer now.

Though I would strongly recommend you try any browser but…

Tags: , ,

Leave a Reply