Archive for April, 2005

30Apr’tis Koninginnedag!

…maar ik ben de enige hier die dat weet…’t drinken wordt minder dit jaar…

Proost!

29AprMusic fan?

This is rather good.
http://www.rathergood.com/elephants/
http://www.rathergood.com/alf/
http://www.rathergood.com/holding/
http://www.rathergood.com/bunny_too_tigh
http://www.rathergood.com/chicken/
http://www.rathergood.com/bill/
http://www.rathergood.com/meatball/

and of course, the classic…”Moon Song”:
http://www.rathergood.com/moon_song/

28AprAdded server side dialog feedback system

AJaX thingies are fun

I was re-doing some of the admin pages on this site so they behave like desktop applications and I thought why not make a cool feedback system instead of the old boring echo-ing out of status messages like <h2>DONE!</h2> or <h2>Record updated</h2> .

So, basically, what I did was abuse XMLHTTPRequest (again) for my alert messages. The idea behind it is, if something server-sided wants to tell me something, it should do so with alerts, by wrapping up the message in a span tag with a predefined ID and send it back along with the reply.eg:

<span style="display:none" id="popupmessagetext">Message goes here.</span>

I’m using an inline style declaration because, well, it’s a system span, and not a design or content span. I shouldn’t have to even think about system spans when writing CSS files or templates.

And on the client side, I simply check for the span, and alert the message should it show up in the reply:

ajax.onreadystatechange = function() {
if (ajax.readyState == 4 &amp;&amp; ajax.status == 200) {
obj.innerHTML = ajax.responseText;
var obj2 = document.getElementById('popupmessagetext');
if (obj2)alert(obj2.innerHTML);
}
}

You can see an example of the result if you comment here.

26AprThe BossHoss

I’m not that much of a country and western fan, but I really really like The BossHoss songs.

They take pop and hip-hop songs and cover them in a country/western style. The results are hilarious and very cool songs.

Check them out.
http://www.thebosshoss.com/