IE7 & JSON
Man, IE7 is shaping up more and more to not suck horrifically. They’ve finally taken the <select> element and made it drawn by the HTML rendering engine, instead of being drawn as an actual Windows Control. See this post for details: IE Blog
I swear I read a reason for why they did that, but good lord does it ever seem silly now.
Also JSON is awesome even if I’m not sure how to pronounce it. Jay-son? Jay Ess Ohh Enn? Either way I plan on switching much of the XmlHttpRequest stuff in ResTek apps over to this now that Kian got php-json installed on all of our servers. There’s just something fantastically awesome about getting a response from the server that can be eval()’d and then accessed as an object. Much better than returning a string|that|looked like|this and then split(‘|’) ing it.
Seriously, compare this:
var info = ajax.response.split('|');
if(info[1] && info[3])
To this:
var json = eval('(' + ajax.response + ')');
if(json.stunum && json.student)
JSON makes the code so much more readable, it’s fantastic. That combined with the ease of outputting (it’s a simple calle to json_encode() from the PHP) makes it super-fast to use.
I’m also a big fan of the table sorting script I stole from kryogenix.org. It takes what was an ugly server-side mess and makes it a slick client-side script. Unobtrusive Javascript using standard DOM interfaces? Color me thrilled.
January 18th, 2006 Comments Off



