Javascript with DOM II

Working here at the DMV on their web team I’ve started to realize how powerfull and important it is to know and understand javascript, or what is more formally known as ECMA Script (which stands for European Computer Manufacture Association).

A brief history of javascript

Javascript was simply the name Netscape gave to their proprietary version of ECMA Script. They gave it that name for pure marketing purposes, since Java was the new cool kid on the block netscape wanted in on the action and thus the reference ‘javascript’ was born.

Since javascript was so popular Micrososft adopted its functionality into Internet Explorer, version 3 I think. So then Microsoft started to make some javascript proprietary to IE durring the dark days know as the browser wars. Many technologies were mutilated and twisted to server their evil overlords including not only ECMA Script but also HTML, XHTML, and CSS to name a few. We all know the ending, Microsoft (the bad) beat Netscape (the ugly) into a bloody pulp. The battle not only destroyed netscape but also left a path of twisted, mangled, and inconsistent technologies that only IE could read.

But Microsoft sat and did nothing to ‘clean’ the mess the browser wars left, so along game the W3C (the good). W3C re-established these technologies as standards under one umbrella. However since everyone knew what javascript was it retained its adopted name. ECMA script is now only refered to as such by those few who survived the browser wars and web technology historians.

So what does this mean?

Well, since I am becoming more enlightened to the power of javascript I am now more inclined to learn more about it.

There are a ton of tutorials and walkthroughs out there on javascript but so far I have only found one that does a good job explaining some of the more important aspects of javascript. The relationship between ECMA Script and DOM II (Document Object Model).

So what is DOM? Well, DOM is a standard like CSS, XHTML, and javascript. DOM defines the building blocks of web pages and can only be accessed via a browser scripting language like ECMA Scr… whoops, sorry, I mean javascript.

Javascript is able to manipulate nodes and elements on a page dynamicly through the DOM hierarcy. One such hierarchy could look like this:

  • <html>
    • <head>
      • <link>
      • <script>
    • <body>
      • <div id=”maincontent”>

Being able to have access to the page like this gives you great power, and with great power comes greate responsibility! However, the main point of this artical is that there aren’t very many good tutorials out there about this stuff. A lot of the tutorials only give you enough smarts to find and implement premade sinipits of javascript. But there is one that I found that does a good priemer on how to use javascript with DOM, and suprise suprise… its from apple.com!

Dynamic Content with DOM 2 (part I of II)
Dynamic Content with DOM 2 (part II of II)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s