Down to three bugs

2008-06-20 1 min read Red Sox Eddie

I’m officially (at this moment) down to three bugs on my project at work. This means… that I am almost ready to resume my life, as well as writing here… for the first time in 6 straight months. I’ll be taking some (much needed) vacation time at some point, but am anxiously looking forward to re-connecting with this site.

Additionally, can I just mention that the Celtics won? So my Red Sox are World Series champs, my Giants are NFL champs, and now my Celtics are NBA champs. How sweet is that???

Getting a button element's value attribute (not innerHTML) in IE

2008-05-23 2 min read Ie Ie8 Javascript Microsoft Eddie

After spending a small part of my evening debugging Javascript in IE (which is ALWAYS a pleasure), I found out one of my errors was a mistake I had made before… trying to access button.value in IE. IE, of course, being IE, returns the innerHTML value of the button, instead of the value attribute. Last time I ran into this, I used a class instead of value, and moved on with my life. Tonight, I was feeling stubborn, and I found a better way…

target.value = target.getAttributeNode(‘value’).nodeValue;

I’m sure I’m about the millionth person to discover this, but I couldn’t find it anywhere using standard searches, so I thought I’d try to emphasize it here so others could find it. (Hopefully it’s not so common that everyone else knows it!)

At first, I used the following:

target.value = target.attributes.getNamedItem(‘value’).nodeValue;

Then I looked at Flanagan’s Javascript: The Definitive Guide (using his amazon associates link), where he states that IE implementation of the attributes array,“makes it impossible to use this feature portably.” He doesn’t mention which version of IE (this specific line of code worked in IE6, IE7, and IE8a), but I figured I’d go with the more general version.

If you read this, I hope I could save you a bit of time.

P.S. – I used IE8a’s Debugger to help. Here’s hoping they develop it further before the standard release. It’s MUCH better than flying blind, but I can’t imagine a less helpful message than specifying an object in the console, and seeing “{…}”.

My first flickr video

2008-04-27 1 min read Flickr Eddie

I’m pretty happy with Flickr’s new video service… I took this video back at the beginning of Feb, and tried to upload it to YouTube, where it was promptly rejected for being in the wrong format. I didn’t want to bother converting it, so I just forgot about it for a while. Flickr, on the otherhand, instantly uploaded and converted the file for me. All I had to do was pick the file. Since I’ve been ridiculously busy, I can’t beat the convenience factor with a stick! So enjoy!

Older posts Newer posts