It's more than a house. It's an adventure.

Sunday, September 21, 2003

Is the book wrong? Or are we taking steps backwards?

So I'm at work a week or 2 ago trying to get some JavaScript working across several frames in a nested frameset (yes, I know, frames are evil, but it's a requirement of the app I'm developing) and having a terrible time accessing elements inside the document that's in a particular frame. I pulled out my trusty Dynamic HTML: The Definitive Reference and opened up to pages690 and 691. Turns out that after getting a reference to the frame, I needed to get the "contentt window" of it to address the elements contained therein.

Now here's where it gets weird. There are 2 entries for this item - "contentDocument" and "contentWindow". The former is supported by Netscape 6 and DOM Level 2 (the spec), while the latter is supported by IE 5.5 and Netscape 7. Conspicuously, the DOM is left out here.

What I haven't found yet (mostly for lack of time to tinker) is whether Netscape 7 supports contentDocument. I can't believe that the Mozilla team would take a step backwards. I can understand adding contentWindow to get more compatiblity with sites developed toward IE, but I hope they didn't drop contentDocument.

0 Comments:

Post a Comment

<< Home