Archive for June, 2007

objects as arguments fail in IE

Microsoft did it once again ! - tried to pass an object to a function but didn't work out. So this is the work around I cooked up ... sleazy eh !

was trying this:

<li onclick="myFunction( { listObject:this, customOption: 1 } )" > List text bla bla </li>

Now this above code worked in FireFox flawless ! but IE started giving me problems. More specifically, I wanted to highlight the li item and call another script via AJAX for which I needed the value for my customOption. But hell no ! Professor IE says the world goes round my way and the WebStandardsProject would keeping on feeling my shoe in their backside ! BLEKH ! - so I cooked up this workaround. Its fail safe:

<li onclick="this.prototype.customOption = 1; myFunction(this);">List text bla bla</li>

Now this is pretty cool. You can add any property or even a function using the "prototype" global function. It would really help if you read a bit more about it here these netscape guys were the creators of the JavaScript in the first place and this handbook here is pretty cool.

There is a downside to this workaround however, imagine there are many options, your code will SUCK! - I hope these evils are undone in IE 7 and other versions to come. However I'm still wondering why does IE not take "{ propertyName1: value, propertyName2: value, ..... }" model as arguments properly ... anybody out there has a clue let me know ! - I'd really appreciate your comments.

Darn it !!

Shifting me theme again :( the previous one was having usability problems ... as much as I like it. The thing is me n my friend are knee deep in work and since we are damn lazy too so not finding time to rectify the theme. Anyways, lets see when does this cycle break !

Meet Guggoo Cat !

GUGOO CATAlrighty mates ! ... here is my big fat cat. Since he is so fluffly and all, we've named him Guggoo CAT. I mean, we tried to call him SAM - but just can't help it! ... he IS a GUGGOO CAT only !~ hehehe :P