All posts in Web dev

Off to @media London

I’m already in London, strollling a bit while awaiting @media 2007 to start on Thursday.

I’m at the Thistle city Barbican hotel, thus if you are attending the conference and staying there, let me know so we can have a few drinks.

My brother Damir is coming from Sweden and I’m certain the conference would be a great experience. I’m really looking forward to meet more people.

innerHTML kills event handlers

This is probably old news to regular Javascript coders, but for me it was an ugly bite. I have renewed my interest in JS with the abundance of libraries springing up and started coding few solid client side interfaces in the office.

A certain interface was previously built in a hurry and HTML code was littered with plenty onclick="somefunction()" code. I re-factored all of that so that handlers were added on DOM.load; however, there was one nasty feature left in the code.

I had a table of 6 rows and button which that says “Add line”. Adding lines is easy: create the whole table row HTML on server, fetch that with XHR call and do tbody.innerHTML += sRow. Actually, this was the code I used for IE and as soon as this is done, all the previously set event handlers went missing. Like they never existed.

Bottom line: changing innerHTML property removes all late-bound event handlers and script on that piece of the page.

Solution was to get off my lazy fingers and type in proper DOM calls: insertRow and insertCell. Clean code and no browser branching. :)

Ma.fasteria

After my last rant, Larry from Ma.gnolia chimed in, saying that improvements are on the way and indeed they were.

Much better than before

3x less bytes to download, but I believe more importantly – 10 HTTP requests now, 2x less than before. 6kB HTML, only 1 .js file and only 1 .css file. And none of the old functionality is lost. If there is anything lost, I did not use it then.

One could call this perfect. Great work.

Ma.Slowlia

I started using ma.gnolia.com several months ago, as I realized that my Firefox bookmarks.html creeps close to 2MB, out of which I regularly use about 50. Rest is just nice to save. I went through several online bookmark managers and chose the flowery site because it has a nice interface and it works just fine. The Mini Ma.rker that you use to add new bookmarks is nicely done.

Apart from the fact that I much too often see this:

Where's my interface dude?

If you can point me to the save button, you’re my hero. Continue Reading →

Wal-Mart Video Downloads — amateurism par-excellance

You have to be really, really…ignorant ass, to do this.

As viewed in Internet Explorer 6

As viewed in Firefox 2

I don’t even want to mention the crappy image handling for the covers. Beh…I don’t even want to look at this again – it’s an insult to web developer profession…even common sense.

Update: 1 day later, they seem to have fixed the display, although there are few overlaps here and there. No, I did not visited it :) – I saw it mentioned in the comments on Digg.

Update 2: two days later, any browser except IE is toll to go…