SageFix. LetsFix!  
Current Location : Home > Web Development > JavaScript > Want to learn about Document Object Model (DOM) Share/Save/Bookmark    

Main Menu
SageFix - Let's Fix

Board Categories
    Web Site Designing
- Graphics
    Web Development
- .NET
- Classic ASP
- JavaScript
- PHP
    WebSite Management
- Promotion Techniques
- Search Engine Optimization
    Databases
- MySQL

Tutorials

Database Connection Strings

  Contact Us


 1 - 39 of 39 [Total 1 Pages]  
Want to learn about Document Object Model (DOM)       Jul 16, 2002, 02:58 1
  
Hi all

I want to learn about Document Object Model and at the moment I'm trying to find some resources using Google.

If any of you can recommend me a nice reference site, I will be happy..

Thanks in advance

 
      Jul 20, 2002, 17:28 2
  
> I'm pretty sure IE does support all the web standards

Nobody supports ALL the web standards.

Have a looksee at http://www.westciv.com/style_master/...owser_support/ which gives a good overview of which bits of CSS are dropped on the floor by IE/Windows (and IE/Mac, and Netscape 6, ...)

Remember the hoo-ha 6 months back when MS locked a whole bunch of browsers out of their websites because the other browsers "don't support standards"? Opera posted a rebuttal document on the web that validated as XHTML with the W3C validator, which the then-current IE made a complete dog's breakfast of. (it's still there, at http://www.opera.com/pressreleases/xhtml/20011026.xml - IE6 fails completely to render it in any meaningful way, so use another browser if you want to read it)

My (entirely subjective) opinion is that Mozilla has the "best" standards support at present, closely followed by IE6. There's room for improvement in both of them.

There are a lot of standards, and some browsers support some of the standards well and other standards badly. e.g. Opera has excellent CSS1 support, but lousy DOM support. IE gets better with every iteration. IE6's Standards support is pretty good. IE5/Mac has CSS support up there with the best of 'em.

> Microsoft for some reason feels the need to develop and
> support a whole slew of additional features?

With one exception, which I'll get to in a minute, MS are not developing many new "additional features", just maintining support for some old ones. While I think continued support for some of these is bad for the web in general, I have some sympathy for why MS is doing it.

The exception is the ever-closer symbiosis between IE and Windows - witness ActiveX plugins and the dropping of support for Netscape plugins. So now, anyone attempting to develop plugins has to work twice as hard to support any other browser. No prizes for guessing why MS is doing that.

> All I can say is that the numbers speak and I must listen.

(interesting link, thanks)

Indeed. From those stats, the top three browsers are:

- IE5 (57.5%)
- IE6 (27.0%)
- NS6 (5.2%)

Those three all have pretty good standards support. If you work to the W3C standards, your stuff should just work in all three of them, without any browser sniffing.

Things might get a bit sticky in DHTML, since support for the W3C DOM isn't that great in IE5.0, but since the document.all DOM and the W3C DOM are fairly similar in many areas, it shouldn't take much browser sniffing to get round it.

If you stick to HTML and CSS, your pages should work fine in Opera too, without you having to lift a finger.

That's the whole point of standards. You shouldn't have to think about this stuff. You shouldn't NEED to point to the browser stats - it should be irrelevant. And things are moving in the right direction - the biggest remaining obstacles are:

- NS4.x, which is a disaster with CSS.
- web authors who refuse to acknowledge the existence of anything beyond IE and NS4.

Barring aberrations like NS4, if you write your site to the W3C standards, you should be fairly browser-proof. If the browser doesn't understand anything, it'll ignore it, and just deal with what it knows. It might not look pretty, but if you've done your job right, it should at least be readable.

All that aside, do you where those numbers will be in 6 months? 12? 24? Nope. Follow the standards, and you're also building in some degree of future-proofing, should anything "nasty" happen to those figures.

> I have ZERO knowledge about NS6, and don't want it, so if
> it's better, I'd just rather not know

It's better. Sorry.

NS6 (and the forthcoming NS7) have CSS support which is at least as good as IE6. Go on. Just feed Netscape 6 your IE stylesheet. It'll probably work, without any changes. It'll certainly look a lot better than the NS4 stylesheet. Try the same with Opera.

> Oh, and don't talk to me about MathML

I'll just say: it's very cool if you have to display ANY kind of mathematical formulae. Like thousands of people around the world have to on a regular basis. Do you have any idea how much grief it is to render a big formula as a graphic and then integrate it with your page? But if you don't need to, you don't need to, and that's that.

> I'm one of those people who has a major beef with the
> inferiority of the NS DOM,

Then you should like the W3C DOM, which is fairly well supported by both IE6 and the whole mozilla/N6 family.

</rant> Oops. That got a bit epic, didn't it?

 
      Jul 27, 2002, 07:27 3
  
lol @ the word share in place of the obvious word ownership

Flawless

 
      Jul 16, 2002, 13:26 4
  
see also:
http://www.mozilla.org/docs/dom/domref/

Mozilla (the web browser) is also worth mentioning for its DOM Inspector (tools->web development->DOM inspector, or ctrl-shift-I), which allows you to browse the DOM of any web page, giving you the browser's-eye view of the HTML/CSS.

I'll also add my voice to shoop's recommendation of the articles over at www.scottandrew.com

 
      Jul 16, 2002, 13:51 5
  
Here's a fantastic DOM browser that can be used in IE5+ & NS6+
http://dl.alphaworks.ibm.com/technol...dombrowser.zip

Also, if you download the "IE5 Web Developer Accessories" pack from Microsoft (fine for IE6 too), you will find that also includes a (less sophisticated) DOM browser too.

 
      Jul 27, 2002, 08:02 6
  
IE ownz the WWW!
lol!

 
      Jul 17, 2002, 01:53 7
  
Hi - thanks for the help.. but..

what do you mean by a DOM browser?

 
      Jul 27, 2002, 08:05 8
  
As it should be in my opinion.

Flawless

 
      Jul 17, 2002, 03:34 9
  
Yeah - i'm a bit confused by that too.


explain further mate @ Marco

Flawless

 
      Jul 27, 2002, 11:27 10
  
Quote:
I haven't tested [SVG] in NS6/Moz1 (they **might** support it)
There are moves underway to get native support in mozilla, but it's not yet turned on by default in the nightly builds - and may not be for some time.

They are going for "native" support - the intention seems to be that you include the XML SVG markup straight into your document. This then allows you to manipulate it using the DOM if you feel so inclined.

see http://www.mozilla.org/projects/svg/ for details, including screenshots of it in action.

 
      Jul 17, 2002, 05:38 11
  
The same as Mozilla's "DOM Inspector", but VERY powerful indeed. It's a tiny download, so just try it!

Suck it and see!
(old Rennie's advert catchphrase, in case you were wondering)

 
      Jul 27, 2002, 12:04 12
  
Thanks for the info, blufive!

 
      Jul 17, 2002, 09:39 13
  
Oh goody, I get to recommend my own tutorial:

www.pageresource.com/dhtml/ryan/

THe last page deals with DOM. It really is pretty simple to understand and gets to some pretty complex features in the end.

Also:

http://www.entenman.net/links/web/

The page is ugly, but the links are good.

aDog

 
      Jul 17, 2002, 09:47 14
  
Thanks @ Ariella - coz i don't know anything about the DOM.


Marco - I downloaded it.

Still don't see the point in it though, for me.

I guess it must be useful for people that don't know
the dom inside out, though - and i mean really useful!

Flawless

 
      Jul 17, 2002, 14:43 15
  
I don't use it to learn anything about the DOM - I primarily use it for debugging!

However, those not so familiar with the DOM will probably find it interesting to explore the properties of all the objects and collections that are contained within. Hands-on exploration is always a good way to learn about something - in my book anyway!

 
      Jul 18, 2002, 01:35 16
  
? Debugging ?

What kind of debugging....

I normally find debugging fairly swift in browser environments, even in our largest
and most complex internet applications you can use the
MS script debugger to find faults in any clientside scripts
in seconds if you don't see them yourself... and
i'm not sure what kind of other errors you'd be encountering?

Flawless

 
      Jul 19, 2002, 17:26 17
  
All U need is MSDN
http://msdn.microsoft.com/library/de.../dhtmlrefs.asp

 
      Jul 16, 2002, 03:07 18
  
Well i know the dom fairly inside out.

I learnt it all from usage.

My main stage of reference is:

msdn.microsoft.com/library

then in the contents frame:

Web Development -> HTML & Dynamaic HTML -> SDK Documentation -> Reference

There you'll find the objects, methods, events and property that specify the "outer extent" core of the dom.

If I've misread you and you actually REALLY want to know the inner core of the DOM then you'll need to go to
www.w3.org - BUT - i don't think this is what you're looking for.. since this is WAY beyond what most people
here know - and if you wanted that you wouldn't have
to ask here for it

Flawless

 
      Jul 20, 2002, 17:51 19
  
Epic indeed. Well, thanks everyone for the great debate. I got what most people are looking for on message boards....new tasty bits of knowledge. I feel I have made my point in some areas and been putin my place in others (However, if we don't cut this off, it could run on FOREVER!)

Oh, and blufive...thank you for the link....I'll check it out when I have more time. Also, since this debate started with me saying I'd like to point out that on every page for every object/attribute/methodd it has standards information (HTML 3.2, 4.0, DOM compliance and CSS version, etc) so I still think it is pretty much all you need. (even for the W3C DOM)

 
      Jul 19, 2002, 17:34 20
  
For IE DOM, but what about the REAL DOM, W3C DOM? SImilarities...yes, but how can you program correctly without knowing the differences? Please don't leave out Netscape users (at least Mozilla/NS 6+ users).

aDog

 
      Jul 19, 2002, 22:17 21
  
Ah, sorry. I'm one of those people who has a major beef with the inferiority of the NS DOM, as well as NS's CSS support, and HTML rendering, and just about everything else. It just does so many things wrong (I have ZERO knowledge about NS6, and don't want it, so if it's better, I'd just rather not know) Netscape has alot of other stuff going for them. They should stop wasting decent manpower on their crappy browser that garners only twice the market share as search engine spiders and bots combined.

Competitve browsers today is stupidity. Back when both NS and MS charged $$$ for their product, it made sense, because the competition was about securing the sales dollars. But now that they are both free...why the competition? The W3C is great, but they are so slow to implement new features into standards. I know that you can't get IE on Linux, but one ofthe browsers you can (Kommander?) is better than NS on Linux from a standpoint of rendering accuracy and CSS support. Now, don't get me wrong, I'm no Microsoft advocate, and I ain't Bill Gates' nephew, but browser software is one arena where MS just has it right. They develop new and useful objects into their DOM, add cool features to CSS (like DHTML Behaviors), and powerful tools for true DHTML (like Dynamic Expressions and Visual filters) And they provide excellent support for all of it via MSDN. I have yet to find a better reference for anything (PHP, SQL, etc) that is as comprehensive as the DHTML reference I linked to above.

</rant>

 
      Jul 19, 2002, 22:47 22
  
Quote:

Ah, sorry. I'm one of those people who has a major beef with the inferiority of the NS DOM, as well as NS's CSS support, and HTML rendering, and just about everything else. It just does so many things wrong (I have ZERO knowledge about NS6, and don't want it, so if it's better, I'd just rather not know)
Adog pointed me to this thread. Do you have any clue what you just said? You just stated that support for DOM1, most of DOM2, and even a DOM3 interface, the best support for CSS1 and CSS2 anywhere, CSS3 selectors, and the only browser other than Amaya to support XHTML 1.1 is worse than IE, which supports DOM1, some CSS2 (not the useful parts), and only XHTML 1.0 transitional?

Have you ever used any Gecko-based browser? (You admitted to never using NS6). If you are basing your assumptions on the current "Netscape" - you are so wrong it isn't even funny. I can understand you though if you are thinking about NS4. Try NS7, or grab the latest Mozilla build from www.mozilla.org.

Quote:
The W3C is great, but they are so slow to implement new features into standards.
Existing standards aren't modified, just added to. IE is slow to implement useful web standards. W3C isn't slow to implement useful and powerful ones. MathML, SVG, XLink, XSLT, etc etc.

Quote:
I know that you can't get IE on Linux, but one ofthe browsers you can (Kommander?) is better than NS on Linux from a standpoint of rendering accuracy and CSS support.
How can you say that when you've never even used Konqueror? It is nice, but I even prefer IE to it, which says A LOT.

Quote:
They develop new and useful objects into their DOM, add cool features to CSS (like DHTML Behaviors), and powerful tools for true DHTML (like Dynamic Expressions and Visual filters)
At the cost of spending time implemented standards. DHTML behaviors are nice, and W3C currently has no "standard" equivalent. The CSS3 Behavoral Extensions module should fix that though. There are better alternatives to behaviors though. Gecko (NS6+, Mozilla, Galeon, K-meleon, and Beonex to name some browsers) support XBL (eXtensible Binding Language), which is a W3C Note and is setup in a superior way than behaviors. The only thing really missing from XBL (bugs - specs define them, but currently aren't implemented) are a global namespace, and the ability to dynamically remove a binding efficiently.

Quote:
And they provide excellent support for all of it via MSDN. I have yet to find a better reference for anything (PHP, SQL, etc) that is as comprehensive as the DHTML reference I linked to above.
MSDN is nice, I'll be the first to admit it.

I'm sorry if I sounded furious, or acted like a troll, but it is because of people with the exact mindset of yours that the web is in such sorry shape. If you don't use IE on Windows, you are left out of too much. Considering IE on Windows is one of the poorest browser/platforms you can choose, that says something.

 
      Jul 19, 2002, 22:59 23
  
Hey, no ill will. All in the name of good controversy! Yes, I can only base my knowledge off my personal experiences and those related to me by people I trust...and quite frankly don't have the time to learn. I think my point is best made by this fact: Look at hom many current posts in this forum alone deal with NS-only problems. Heres a link with some recent data to back me up. As you can see, almost half of Netscape users still use 4.x

I appreciate your knowledge and position, and would like to learn more about Gecko-based browsers, but until their market-share increases, it's not going to do me much good. Most of the sites I work on are for small/medium sized business, and they simply do not have the budget/concern for developing what should be 1 website for multiple platforms. ("Yes Mr. Johnson, we can get you an 8% larger audience with an extra 40% investment in time and money.") Hence the source of my frustration, because Mr. Johnson's Mom or somebody else he knows uses Netscape, but he doesn't want to pay to have every line of code typed twice (and I don't blame him) It may be good for competition and development, but it's bad news for us freelancers who are unfortunate to live in an area where the market won't support bloated development costs.

</rant:again>

 
      Jul 19, 2002, 23:27 24
  
Quote:

he doesn't want to pay to have every line of code typed twice (and I don't blame him) It may be good for competition and development, but it's bad news for us freelancers who are unfortunate to live in an area where the market won't support bloated development costs.
This is why web standards are NECESSARY. Think about this for a moment. W3C defines free, open, well-documented specifications for browsers to implement. Often times giving suggestions to user agents on how to implement them directly in the document. (Read CSS3 Color Module for an example of HSL, and W3C providing code to help).

With that established, any browser can come along and view pages coded to web standards fine.

I could be using Mozilla, you IE, someone Opera, someone else, Konqueror, and someone UnreleasedFictionBrowser 2.0. As long as these browsers implemented web standards, guess what? Your code will only be written once, and rendered identically across all compliant browsers and platforms.

If IE better supported web standards, nobody would be complaining that Gecko doesn't support IE-only code. Does the term "IE-only" have any meaning to people who complain? It is easier for everyone (including Microsoft) to implement already specified and well defined specs, rather than create their own, which leads me to believe [b]Microsoft is purposely making the developer's life harder[b]. (Of course, by doing this they are locking you into proprietary implementations - IE - as the only resort for ease.)

None of that bs about IE makes colding pages easier applies here either. Sloppy coding is bad, encouraging sloppy coding is worse. In the end, IE only makes your life harder.

 
      Jul 20, 2002, 14:21 25
  
I agree with everything you say save one:
Quote:
If IE better supported web standards
I'm not 100% sure, but I'm pretty sure IE does support all the web standards (if not, please cordially point me to someplace where I can read what they don't, so I'll know). I think what you are trying to say is that they should support the standards and ONLY the standards. This goes back to what I said a couple posts ago....competition has made things worse in this arena. Microsoft for some reason feels the need to develop and support a whole slew of additional features? Why? I'm not sure. Maybe they think the standard sucks. Maybe they'd rather be in control of the standards like they are with everything else. All I can say is that the numbers speak and I must listen. If not, I cannot always deliver to clients' and their clients' expectations. (In other words, becuase I don't think anyone here gets it yet, I'm looking at this subject from business standpoint, not a preference standpoint) Like a politician (please, no dirty politician references/jokes) I must speak for the opinion of my public, and my public has spoken. It uses IE. Oh, and don't talk to me about MathML and XSLT, because last time I checked, this was a DHTML/javascript forum, not a W3C recommendations forum

</rant>
<flame: on>

 
      Jul 16, 2002, 03:15 26
  
Hi Flawless_koder

No, you did not misundertand me. I am in need of just what you described at the beginning. I was looking at w3schools. I'll try the address you provided then..

thank you for your time


 
      Jul 20, 2002, 18:58 27
  
Quote:

so I still think it is pretty much all you need. (even for the W3C DOM)
Except for the fact it ignores the existance of DOM methods IE doesn't support. Which is why for a W3C DOM reference, it is completely inadequate. As an IE reference, it is excellent.

Anyway, about IE6/Windows CSS support - if you have ever tried using CSS2 selectors and some of the more advanced properties, you'll never again say it comes close to Gecko or even Opera. And I mean it - it is better than nothing (i.e. NS4), and is possible to do simple table-less layouts with it, but if you are truely trying to separate markup from presentation in XHTML, you won't be able to accomplish everything you wanted as easily (or even possibly) because of IE's lackluster support.

IE5/Mac actually has superior standards support than IE6/Win, good enough in fact that after Gecko, I'd probably recommend that browser.

blufive - while no browser supports all the standards completely, some (i.e. Gecko) completely dwarf other browsers in terms of support. Gecko implements most of the specs regarded as a "W3C Recommendation", a lot of "Candidate Recommendations", and even a "Working Draft" here or there. You can't ask it to support many more interfaces. XHTML support is there, CSS1,2, and even parts of 3 (some of the selectors, and properties implemented as -moz-propname), are there, DOM1, all of DOM2 except for the NodeIterator interface specified in Traversal-Range and parts of the DOM2 Style-CSS interface, and it even supports the DOM3 XPath interface. Excellent XML and XSLT support, RDF support, xlink:type="simple" support. Then it supports rendering presentation MathML 2.0 (doesn't apply smart rendering to content mathml, which user agents aren't required to do, but would be nice though ), and you can get builds of Mozilla with decent native support of SVG. Not as complete as the Adobe Plugin, but the ability to embed SVG elements directly inside a document through namespaces is incredible. Etc etc

Compare this to the severely lacking "supported standards" specs of IE, and well, they simply don't compare.

 
      Jul 22, 2002, 02:06 28
  
I think ie's compliance is quite enough to allow us to work with it.

I never realised that any browsers went as far as you've
just listed - but if so - wow.

All browsers have, admit it or not, taken a step in the right direction in recent years.

Flawless

 
      Jul 16, 2002, 03:18 29
  
That's ok.

Good luck - and just ask if you need anything else,
or anything more specific!

Flawless

 
      Jul 26, 2002, 12:14 30
  
I just came across this:

http://www.oreilly.com/catalog/jscri...pter/ch17.html

It's a chapter from a new O'Reilly Javascript book, published on the web as a teaser/advert/trial for the entire book, and appears to be a guide to the basics of the DOM.

Have fun...

 
      Jul 16, 2002, 03:28 31
  
Thanks Flawless!

If I can see this page of Microsoft's, i may go further and ask you questions.

Ages have passed and the page has not been downloaded. What are they doing, composing a new page at each request?


 
      Jul 27, 2002, 04:18 32
  
Quote:

I think ie's compliance is quite enough to allow us to work with it.

I never realised that any browsers went as far as you've
just listed - but if so - wow.

All browsers have, admit it or not, taken a step in the right direction in recent years.

Flawless
I ran into a problem the other day as it goes, although there was a workaround with using svg, but it is still a fairly new language anyhow

 
      Jul 16, 2002, 03:33 33
  
No - the page has a large table of contents.

it takes two seconds to load here sometimes on our connnection.

What speed connection are you on - 56kb/s ?

Flawless

 
      Jul 16, 2002, 03:37 34
  
No - cable; but it sometimes get worse than my 56kB/s connection at home



poor service..

 
      Jul 27, 2002, 04:33 35
  
What was the problem?

Flawless

 
      Jul 16, 2002, 03:38 36
  
OUCH!!!

Flawless

 
      Jul 27, 2002, 04:43 37
  
no support for svg graphics so you cant do

<img alt="svg" title="svg" src="blah.svg" />

but i wanted to use it for a bullet using style sheets.

Can't remember where i posted it, think it was the db's and xml forum, but m@rco said that none of them have implemented this, which i suspected anyway

 
      Jul 27, 2002, 07:23 38
  
Quote:

but m@rco said that none of them have implemented this, which i suspected anyway
Actually, I said:
Quote:
Unfortunately, browser support for SVG has not yet evolved to the point where you can use SVG files as you would JPEGs and GIFs (at least not in IE anyway).
I haven't tested it in NS6/Moz1 (they **might** support it), but if IE doesn't do it, then there's not really any point using it given the current browser market share!!!

 
      Jul 16, 2002, 07:00 39
  
You may find these two links useful -

http://www.scottandrew.com/index.php/articles/dom_1

http://www.xs4all.nl/%7Eppk/js/index.html?version5.html

 
 1 - 39 of 39 [Total 1 Pages]  









Subscribe to our mailing list
email


Current Location : Home > Web Development > JavaScript > Want to learn about Document Object Model (DOM) Share/Save/Bookmark    

Development problem? SageFix is completely free -- paid for by advertisers and donations. Click here to Contact Us If you have any query. Enjoy!
Request processed in 8.0E-5 seconds Home - Contact Us - Terms Of Service - Privacy Policy - Copyrights - Top
Advertisements do not imply our endorsement of that product or service.
Current server time now is 18-Mar-2010 06:27:11
Copyright © 2009 Sagefix Inc. All rights reserved.
Powered By SageFix