August 15th, 2007

Satire at it’s best

Posted by Jeremy2 in General Musings / Rants

I’ve just come across the company that does the Demotivators again (and purchased a couple of shirts), and they also have some video/audio podcasts that are definitely worth checking out. It’s entitled: Corporate Spin. There is one in particular that I like, which is called “Principles of Organizational Storytelling” which does not only apply to big companies, but to many smaller companies that I have worked for as well. If you don’t get too sick thinking about how your previous (or current) employers have mistreated you, it will probably make you laugh.

Edit: Wow, two in one day. There’s also the ADD list for the programmers. My personal favorite is in the comments: The decapitated chicken method.

August 9th, 2007

Changing an Internet Explorer input field type via JavaScript

Posted by Jeremy2 in Browser Bugs

Ok, this is a problem that has vexed JavaScript programmers for a long time, and frankly most of the solutions for this problem are rather convoluted. At first, I had written a helper function to determine whether or not Internet Explorer was being used, and then I figured out a better way to do things. Here is an example:


var file_input = document.createElement('input');
file_input.type = 'file'; // Works in everything EXCEPT for Internet Exploder
file_input.setAttribute('type', 'file'); // Works for everything I have tried it in so far.

So there. One less nightmare that you have to deal with when coding in JavaScript.