Weird Thoughts From Eric's Head

Tags - Categories : All | AJAX | BUSINESS | PERSONAL | PROGRAMMING | BOOK REVIEW

Meet Ajax, he has four legs

Just to prove to you how much of a geek I am, I named my dog after the programming term Ajax. I told my wife it was either Fonzie or Ajax.

We got Ajax a few months ago from a rescue. He is a border collie and he may be mixed with something else. No one is sure exactly if he is or is not mixed. He is rather large for his breed about 50 pounds and taller than an average border. He is a smart dog that is lazy as can be! He graduated top of his obedience class. (Sounds great until you realize there was only 5 dogs in the class!)

Ajax in my car

Now when I take him to the dog park, people look at me strange when I say his name is Ajax. They all say: "You named him after a cleaner!" and I always respond with "yep". My wife normally has to say: "He is named after my husband's best selling book."

I personally like my answer because it requires no additional explaination. My wife's has to deal with a conversation. I am there to watch my dog chasing other dogs, not to do one of my speeches!

Once in awhile another fellow geek will be there and know what Ajax is. They would try to explain it to their significant other and usually will give up as they see their eyes glaze over with the geek speak! You all know what I am talking about!

WIFE :"Honey how was your day at work?"
ME :"Well I coded a recursive function that had to do 10,000 iterations with an embedded object that was created dynamically from a child function that was derived from alien that lived on Mars with 20 siblings that had no UFO since the wife ran it into Neptune when she was too busy trying to talk on her cell phone and crush her hair with the windows open sucking all of the oxygen out of the car but she had enough to talk on the phone for 5 hours and wonder why the battery died and she forgot she was driving and ran into the planet and had to call AAA to tow her all the way home and yell that it cost....."
WIFE :"zzzzzzz
ME :"...and now what is for diner"
WIFE :""Oh, that sounds nice! Frozen peas and that is it because I did not have time to run to the store."

One week I went to the dog park with one of my Ajax T-Shirts I got from a conference and a regular at the dog park walked up to me and said: "You got a shirt printed with your dog's name on it!?! Aren't you going a little overboard?"

I just responded: "I guess I love my dog more than you love yours!" That guy has not spoken to me since than! Well I thought I would let you into my personal life a bit, now to close it back up!



Eric Pascarello
Coauthor of Ajax In Action
Moderator of HTML/JavaScript at www.JavaRanch.com
Author of: JavaScript: Your Visual Blueprint for building Dynamic Web Pages

JavaScript Error: "Could not get the cursor property"

I thought I would pull another error to pull from my logs that I found interesting for a Friday post. (For those that do not read my blog, I log my clientside errors to the server, see this.)

The Error

Browser: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
NAME:    Error
DESC:    Could not get the cursor property. Invalid argument.
MSG:     undefined

Well the function that the try catch caught this expection contained the following basic code:

myObject.style.cursor = "pointer";

We all know that IE used hand in earilier versions so I changed my code to do this:

try{
  myObject.style.cursor = "pointer";
}
catch(eOldIEVersion){
  myObject.style.cursor = "hand"; 
}

Since I have added this fix, the IE 5.5 error has not shown up in my logs. I also tested this on my virtual machine running Windows 98 and IE 5.0. The result showed the hand and did not report an error.



Eric Pascarello
Coauthor of Ajax In Action
Moderator of HTML/JavaScript at www.JavaRanch.com
Author of: JavaScript: Your Visual Blueprint for building Dynamic Web Pages