...

Several DOM questions

Leithakor
12-08-2002, 11:42 PM
First off, hey! Found your boards by mistake actually. Glad I did though. Hopefully this'll be a wothwhile venture.

I have several DOM related questions. If anyone can find comprehensive (and relatively simple) articles that explains how to do each, I'd be appreciative. Just post a link beside the number so I know which article is leading me where (ie: 1. Creating / Deleting items ) Please note, that all of these questions refer to a browser rendering the page in XHTML1.0 Transitional / Strict with the proper DTD to force standards compliancy. [Note: Any numbers in [i]Italics and Bold, has been answered.]

1. Creating / Deleting items

2. What are nodes, what do they have to do with transversing the DOM, and in what situations are they best used?

3. Finding mouse coords after page has been scrolled.
I've seen several examples attempt to find if the page has been scrolled by using document.body.scrollLeft || window.offsetLeft (or similiar ideas if those are wrong hopefully that is enough to give you an idea) . What does the standards say about this? Which would you recommend for 5th generation browser and upward compatibility.

4. What is EventBubbling, and how is it used / why is it disabled by some scripts.

5. What is the correct way to access the right-mouse button in standards compliant browsers?

6. Event Listeners, how do I add them and what can I do with them? What limitations are there?

Ok, that's enough questions for the time being. Hopefully I haven't bored you to tear :-D

Edit: Good grief, in 3 articles ScottAndrew.com has answered most of my questions, in a way that "I" understand them. Well for those of you looking for easy to read and understand tutorials. My recommendation goes to (you guessed it) ScottAndrew.com

Edit 1: Thanks Brainjar for the awesome tutorials. =) Thanks to everyone for their responses, helped a lot.

Leithakor

piglet
12-09-2002, 01:06 PM
Hi,

Rather than start an essay, it's probably better to point you to the Mozilla DOM documentation (http://www.mozilla.org/docs/dom/) - in particular the PDF file is very useful.

BrainJar
12-09-2002, 03:09 PM
If you can see past my limited writing skills, you might find these helpful:

Nodes - http://www.brainjar.com/dhtml/intro/

Mouse coordinates - http://www.brainjar.com/dhtml/drag/

Events - http://www.brainjar.com/dhtml/events/

Leithakor
12-09-2002, 03:11 PM
I appreciate the documentation link. I'll keep that one. Maybe it'll help solve my last question.

Now how did I miss those tutorials on your site brainjar? Dunno but everytime I went there I somehow missed it. Much appreciated


Leithakor

beetle
12-09-2002, 03:30 PM
scottandrew.com rocks :D

Leithakor
12-09-2002, 03:50 PM
Lol I agree, when it can answer 5 of my 6 questions in a way I understand it. Then yeah it rocks =)


BTW - Thanks Brainjar, you answered my final question about mouse coords and page scrolling. Wooo lotsa stuff learned. Now to put it to use.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum