HighDots Forums  

DOM CliffsNote

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss DOM CliffsNote in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Anonymous
 
Posts: n/a

Default DOM CliffsNote - 03-15-2008 , 12:19 PM






I spent a day getting to know JavaScript (already know C/C++),
which was not difficult. However, getting my head around the
DOM is another matter. I have been looking for a CliffsNote
version of how the DOM works, and all of the P/M/E's, but so
far all I have found are: long winded specifications (no time),
web pages that are not really focused on my needs, and would
take a lot of effort to print, and come-ons for books. Anyone
know of some good candidates?

While I'm at it, I have a few questions about the DOM for
HTML. Hope someone can help, or direct me to a news group
better suited.

1. My understanding is that the Window is the parent or root
level of the tree. Correct? Most of what I have seen on
the web starts at the document level

2. The Window level has objects regarding the browser history,
browser in use, the current link, etc?

3. Frames are also at the window level, not the document?

Thanks,
Dave
---
e-mail: d boland 9 (all 1 word) at fastmail period fm


Reply With Quote
  #2  
Old   
Rik Wasmus
 
Posts: n/a

Default Re: DOM CliffsNote - 03-15-2008 , 12:36 PM






On Sat, 15 Mar 2008 18:19:39 +0100, Anonymous <xor (AT) hermetix (DOT) org> wrote:
Quote:
I spent a day getting to know JavaScript (already know C/C++),
which was not difficult.
Which makes your question more suited to comp.lang.javascript.
Crossposted/f'upped to there.

Quote:
However, getting my head around the
DOM is another matter. I have been looking for a CliffsNote
version of how the DOM works, and all of the P/M/E's, but so
far all I have found are: long winded specifications (no time),
web pages that are not really focused on my needs, and would
take a lot of effort to print, and come-ons for books. Anyone
know of some good candidates?

While I'm at it, I have a few questions about the DOM for
HTML. Hope someone can help, or direct me to a news group
better suited.

1. My understanding is that the Window is the parent or root
level of the tree. Correct? Most of what I have seen on
the web starts at the document level
Afaik, yes. Usually the 'window.' start can be ommitted though. (Formally
you'd use window.document.someThing, however you can use
document.someThing directly without problems.)

Quote:
2. The Window level has objects regarding the browser history,
browser in use, the current link, etc?
history: check
current url: check
browser in use: depends, don't rely on it / don't care about it. Heavily
favor checking for (the existance of) needed features instead of sniffinf
browsers.

Quote:
3. Frames are also at the window level, not the document?
Guess so.

Not really helpfull from my side, my javascript is really rusty, but
probably you get a more authorative/complete answer in c.l.javascript.
--
Rik Wasmus


Reply With Quote
  #3  
Old   
Ben C
 
Posts: n/a

Default Re: DOM CliffsNote - 03-15-2008 , 12:40 PM



On 2008-03-15, Anonymous <xor (AT) hermetix (DOT) org> wrote:
Quote:
I spent a day getting to know JavaScript (already know C/C++),
which was not difficult. However, getting my head around the
DOM is another matter. I have been looking for a CliffsNote
version of how the DOM works, and all of the P/M/E's, but so
far all I have found are: long winded specifications (no time),
web pages that are not really focused on my needs, and would
take a lot of effort to print, and come-ons for books. Anyone
know of some good candidates?

While I'm at it, I have a few questions about the DOM for
HTML. Hope someone can help, or direct me to a news group
better suited.
comp.lang.javascript is probably better.

Quote:
1. My understanding is that the Window is the parent or root
level of the tree. Correct? Most of what I have seen on
the web starts at the document level
The window is the JavaScript "global object", so it's the root of the
tree of objects in your JavaScript program.

But of course not every object in the program is a DOM object.

If you create a global variable in your JS program, like

var foo = 6;

Then that variable is also known as window.foo.

The document object is a member of the window object that kind of gets
put there magically for you, under the name window.document (or you can
just use the name "document").

In C++ terms "window." means the same as "::".

The methods of the document object are the way into the DOM, for
example:

document.write("hello world");
document.getElementById("foo").style.backgroundCol or = "yellow";

etc.

Quote:
2. The Window level has objects regarding the browser history,
browser in use, the current link, etc?
That kind of thing.

Quote:
3. Frames are also at the window level, not the document?
Yes. The thing is there is one scripting context (i.e. global namespace,
global object, window object) per document.

If you've got frames, you've got several different scripting contexts.
They don't share the global variables. But they do have references to
each others' window objects through window.frames. But that's DOM 0 and
not standard...

Better to try comp.lang.javascript, I've set the followup.


Reply With Quote
  #4  
Old   
Nikita the Spider
 
Posts: n/a

Default Re: DOM CliffsNote - 03-16-2008 , 11:24 AM



In article <f89d6a4ef9b43dc36fd210bf0ec6c997 (AT) hermetix (DOT) org>,
Anonymous <xor (AT) hermetix (DOT) org> wrote:

Quote:
I spent a day getting to know JavaScript (already know C/C++),
which was not difficult. However, getting my head around the
DOM is another matter. I have been looking for a CliffsNote
version of how the DOM works, and all of the P/M/E's, but so
far all I have found are: long winded specifications (no time),
web pages that are not really focused on my needs, and would
take a lot of effort to print, and come-ons for books. Anyone
know of some good candidates?
Short & sweet:
http://www.visibone.com/javascript/

They also have HTML, CSS and MySQL sheets.

(Not affiliated, just a satisfied customer.)

--
Philip
http://NikitaTheSpider.com/
Whole-site HTML validation, link checking and more


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.