473,320 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

writing for both DOMs

Are there any reasonably complete online references for scripting with
both the W3C DOM and the MS DOM? I've got the JavaScript Bible at
home but I don't have the CD that came with it, and I find that I'm
often at a location where I need to look something up?

Right now I'm working on a script that uses "parentElement" in IE. The
script doesn't work at all in Firefox but I can't tell yet if that's
the problem.
Jul 23 '05 #1
5 1153


Jeff Gutsell wrote:
Are there any reasonably complete online references for scripting with
both the W3C DOM and the MS DOM? I've got the JavaScript Bible at
home but I don't have the CD that came with it, and I find that I'm
often at a location where I need to look something up?
Unless you care about IE 4 you can pretty much use the W3C DOM for both
Mozilla, Opera, and IE (5, 5.5, 6).
Right now I'm working on a script that uses "parentElement" in IE. The
script doesn't work at all in Firefox but I can't tell yet if that's
the problem.


Use parentNode, parentElement is indeed part of the IE DOM but
parentNode is supported in IE 5 and later.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2
On 9 Nov 2004 05:43:31 -0800, Jeff Gutsell <je*********@fuse.net> wrote:
Are there any reasonably complete online references for scripting with
both the W3C DOM and the MS DOM?
Not with both, I believe. Whilst the MSDN Library does list some of the
W3C DOM data, some of it is wrong and unsupported parts are omitted
altogether. I would just use the MSDN version to look up
Microsoft-specific information and the W3C DOM references (or something
equivalent) for the standard stuff.

MSDN:
<URL:http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp>
W3C: <URL:http://www.w3.org/DOM/DOMTR>

You can download the W3C documents, but I don't think the MS references
can be distributed. If you have a more recent version of Visual Studio, or
some other Microsoft product that contains the MSDN library, the object
model information is located in the Internet Development section. This
particular version is actually very useful as it contains the IE version
number for each feature when it was introduced (something lacking in the
online version).

[snip]
Right now I'm working on a script that uses "parentElement" in IE. The
script doesn't work at all in Firefox but I can't tell yet if that's the
problem.


It is. As far as I can tell, parentElement is a hold-over from the IE 4
object model. Use parentNode instead (unless you're writing for IE 4 too,
in which case use both).

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #3
Michael Winter wrote:

<--snip-->
This particular version is actually very useful as it contains
the IE version number for each feature when it was introduced
(something lacking in the online version).


http://msdn.microsoft.com/library/de...nformation.asp

Something like that?
Or is the offline version more in depth than that?

But the browser version is irrelevant. Whats important is what version
of the JScript Engine it is supported in.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #4
On Tue, 09 Nov 2004 12:30:23 -0500, Randy Webb <Hi************@aol.com>
wrote:

[snip]
[Tree version of link below]
I hate those links. They never work with Opera. Cutting out the
"/library/default.asp?url=" part results in the same page but without the
tree:

<URL:http://msdn.microsoft.com/library/en-us/script56/html/js56jsoriversioninformation.asp>
Something like that?
That's for the JScript implementation.
Or is the offline version more in depth than that?
The offline library states what object model methods, objects and
properties apply to which HTML element, in what IE version and on what
platform.

Whilst feature detection takes care of what is used, it's quite nice to
know when a particular feature was introduced, especially as I have no way
to check myself.
But the browser version is irrelevant. Whats important is what version
of the JScript Engine it is supported in.


True.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #5
Michael Winter wrote:
On Tue, 09 Nov 2004 12:30:23 -0500, Randy Webb <Hi************@aol.com>
wrote:

[snip]
[Tree version of link below]

I hate those links. They never work with Opera. Cutting out the
"/library/default.asp?url=" part results in the same page but without
the tree:

<URL:http://msdn.microsoft.com/library/en-us/script56/html/js56jsoriversioninformation.asp>

Something like that?

That's for the JScript implementation.


Thats not the one I thought it was. There is another one I will post
when I can find it. I hate trying to find anything in that place.
Or is the offline version more in depth than that?

The offline library states what object model methods, objects and
properties apply to which HTML element, in what IE version and on what
platform.


Thats what the one I am hunting lists as well.
Maybe in one of my insomnia fits I can find it again :(

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

40
by: post400 | last post by:
Hi, there is another famous book 'Writing solid code' but does it apply to Python ? Or it's usable only by Microsoft C programmers ? The author seems to be an ex-Microsoft guy ! Thanks ,...
6
by: Kevin T. Ryan | last post by:
Hi All - I'm not sure, but I'm wondering if this is a bug, or maybe (more likely) I'm misunderstanding something...see below: >>> f = open('testfile', 'w') >>> f.write('kevin\n') >>>...
2
by: Prashanth Ellina | last post by:
Hi, I need to write some data to an xml file. I have an XML Schema defined. I would like to use some mechanism of writing the data to the xml file and having exceptions thrown back to me when...
17
by: Eric Lindsay | last post by:
Is learning to write CSS a better use of time than finding and using a package that produces complete web pages? I've moved to a new platform (Macintosh), taking with me about 400 personal web...
5
by: Jeong-Gun Lee | last post by:
I'm writing a code of writing a value to a specific memory address. ================================================================= #include <stdio.h> int main() { long air; long...
10
by: Caryn Graves | last post by:
I need to write hex into a binary file, i.e., '00A8' (decimal 168) output as 2 bytes, 'FE' (decimal 254) output as 1 byte, etc. Suggestions??
102
by: Xah Lee | last post by:
i had the pleasure to read the PHP's manual today. http://www.php.net/manual/en/ although Pretty Home Page is another criminal hack of the unix lineage, but if we are here to judge the quality...
4
by: Gary Bond | last post by:
Hi All, Can anybody point me to some 'how-to' documentation, tutorials, etc as to how to write a shrink/protect wrapper for .Net exes/dlls, (like the Shrinkwrap product for instance). I have...
2
by: theGirl | last post by:
Hi, Sorry for my english, I'm french ! I 'm using Ajax to build pages with xml files. In my page, I want to have 2 doms for the same xml file : one for the initials datas, ant another which...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.