Raising My Geek Cred

Just to make sure that you don’t get the impression that all I do is play games, I’m starting a new category with geekier stuff. I was hesitant to do this because I’ll be reposting stuff from other sources.

Let me start with something simple. I’ve been playing around with Javascript for more than 5 years already. Okay, maybe not 5 years, I stopped caring about Javascript when I got into college (circa 2003) and moved most of the processing to the server when I learned PHP. AJAX became popular and I’m back to distributing that load.

For those who were used to the pre-DOM/AJAX era, you’ll notice that window.onload or the onLoad event attribute doesn’t work as it used to. This is how it is done for browsers that use Gecko (Firefox et al):

if(document.addEventListener)
document.addEventListener("DOMContentLoaded", myFunc, false);

This will call the function myFunc() after the page has loaded.

I wouldn’t want to bore you with more code (in other words, too lazy to type further). For the rest of the browsers and more explanation, you can learn more from here.

  • Pingback: hardcore porn

  • Pingback: Tamiflu precautions.

  • Pingback: Does tamiflu work.

  • Pingback: Percocet.

  • http://www.time-synchronisation.co.uk/ntp-server-configuration-for-windows-and-linux Gregg Tufo

    This is a usefull post.

  • http://www.xbox360spiele.net Xbox 360 Spiel

    I had been arguing with my close friend on this issue for quite a while, base on your ideas prove that I am right, let me show him your webpage then I am sure it must make him buy me a drink, lol, thanks.

    -Murk