JavaScript: onclick vs mousedown

Recently, I used a JavaScript onclick listener to fire off a function when an a tag was clicked. This worked great in Chrome, Firefox, and Safari. But when I tested it, though, in IE9, it failed. IE did not recognize onclick. After a bit of troubleshooting, using onmousedown turned out to be the best solution for all platforms.

Below are my observations. Hopefully, this will help someone else having this issue.

My first go:
<a onclick=”newRequestAlert();”>
Observation: Works on all browsers except IE.

So, I tried:
<a onclick=”newRequestAlert();”>
Observation: Works on IE but not other browsers (i.e., IE-specific)

Which led me to the final solution:
<a onmousedown=”newRequestAlert();”>
Observation: Eureka!!! Works everywhere.

Apple’s MacBook Air & the Summer of 2013

I love my MacBook Air. In fact, it has replaced my desktop computer. Apple laptops are at the point where they are powerful enough to serve my purposes (I don’t do heavy animation and graphics editing like I used to, but I still run Photoshop, Lightroom, InDesign, and, of course, IDEs). And I love, absolutely love, being able to unhook it and take it with me, knowing that all my software is with me and my server is just a wi-fi heartbeat away.

I switched to an Air during the summer of 2011 and then swapped it out for a new one in 2012 as there was a significant speed jump (along with me underestimating my SSD needs the year before).

I was really excited to see the 2013 offering but I’ve got to tell you, I’m really disappointed. Sure, the battery life is longer but that means nothing to me. I wanted to see some ramped up processing specs. Nope. There is a bit more efficiency in the architecture and subsequently a bit faster, and the processor is improved but basically the same. When it comes down to the numbers, the MacBook Air (Summer 2013) is a pretty dismal release with nothing to write home about.

Oh well, there is always next year. Besides, I need to be saving money so perhaps this was a good thing. In that case, thank you Apple.

Click Here for Official Info from Apple’s Website.

Happy Birthday to the First Program Run from Memory

Happy Birthday! The first computer program to be run from memory was 65 years ago today, June 21, 1948. The computer, the Manchester (UK) Small Scale Experimental Machine (aka, Baby) was the world’s first stored-program computer.

According to Wikipedia, It was 17 feet (5.2 m) in length, 7 feet 4 inches (2.24 m) tall, and weighed almost 1 long ton (1.0 t). The machine contained 550 valves—300 diodes and 250 pentodes—and had a power consumption of 3500 watts. It had a whopping 128 bytes of RAM. The machine was built by Frederic Williams, Tom Kilburn and Geoff Tootill.

Here are sample instructions:
LDN X // load negative X into the accumulator
SUB Y // subtract Y from the value in the accumulator
STO S // store the result at S
LDN S // load negative value at S into the accumulator

Click here for more info at Wikipedia.