Hi...don't laugh, but I only vaugly understand what DOM is. could someone please explain it in a non-jargon fashion. what it is and how it works and why we need it.
I think it's something to do with JavaScript and JScript, Netscape and IE, and getting them all to work.
apprecaite it.
larmyia
DOM...what is it?
Simply, its a representation of the browser loaded webpage (document) in a form that is accessible and modifiable by scripting languages like javascript. By using scripts to manipulate the document you can alter the webpage and achieve effects that can not be achieved with HTML+CSS alone.
DOM...what is it?
DOM...what is it?
DE, After not sleeping all night and looking at that, you seriously freaked me out.
AntiStability
DOM...what is it?
Chris: I'd already read the link, and I didn't really understand properly. can you give me an actual example?
David: I knew someone would go to the gutter
AntiSleep(?): stop showing off your gun toting chick!
larmyia
DOM...what is it?
DE, After not sleeping all night and looking at that, you seriously freaked me out.
take that.
I'm in love . . .
DE :twisted:
DOM...what is it?
I'm in love . . .
with Mrs. Elliot. Behave, dog. Where's the right emoticon when you need it? Shucks.
AntiInfidelity
DOM...what is it?
OK - I'll behave (said in my best Austin Powers voice)
Seriously, what you should do is fire up Firefox's DOM Inspector (Not part of standard install - you have do do a custom install and check the "Developer tools" option in the install process. (This is not the same as the Developer Tools Extension!))
When you have it installed, activate it with a [Ctrl+Shift+I] or [Tools|DOM Inspector]. The DOM Inspector displays a hierarchical tree of the document nodes. Think of a node as the beginning of any nested construct. Each node can be opened to reveal the contents along with any class or id details. The ids are particularly important because they give handles on particular document sections that can then be manipulated with Javascript.
I think that after you have played with the DI for a while you get a much better appreciateion of how the browser sees a document. It also helps explain the dot-separated object naming convention since object names represent the nodal hierarchy.
See, I can be serious when I have to be.
DE
DOM...what is it?
David,
I had actually already installed it (before I even knew what it was!). just opened it. so, you can look on there to find where you want to apply some JavaScript? can't you just look at your xhtml or css? or is this to make it easier?
larmyia
DOM...what is it?
it makes debugging easier, also checking out computed styles and applicable style rules too.
Do you have a handle on objects as in object oriented programming?
When your webpage is loaded into the browser it creates a document object - which pretty well corresponds to the <html> tag. That object has various properties and methods, included in those properties is a structure which contains objects that represent all the elements of your web page.
The document object model defines that structure. It defines the objects used to represent each HTML element, and consequently their properties and the methods by which they can be manipulated.
The DOM standardises how the rendered html page is represented to scripts. Armed with that standard you can write javascripts to manipulate the page in the knowledge that those scripts will work irregardless of the browser used to display the page.
DOM...what is it?
Hi larmyia,
I find this http://www.mozilla.org/docs/dom/domref/ really useful for learning about the DOM
DOM...what is it?
Thanks Tony, that was really interesting. as is usual in computing, it's helped me understand what I didn't get, but introduced new things that I still don't get! I think as mentioned, using it will bring greater understanding!
larmyia
Faking the DOM
Thanks to all for those thoughts on the DOM. It was something that I never felt I understood. Now at least I might be able to fake my way through it.