Posted by Gιrard Talbot on 02/05/06 14:49
JF01 wrote :
> Didn't help the compatability with Firefox. It works when I remove the
> DTD declaration, but the page then doesn't render properly.
>
That's because of
Bug 256932: Add support for exposing elements by their id/name in the
global scope (for IE compat)
https://bugzilla.mozilla.org/show_bug.cgi?id=256932
When you remove the doctype declaration, you trigger Firefox into
backward compliant rendering mode (or quirks mode). The right thing to
do is to always use a strict DTD (a strict doctype declaration) so taht
all modern browsers trigger standards compliant rendering mode.
To view what is the rendering mode triggered by a webpage in Firefox:
Tools/Page info/General tab
I gave you 2 links to bookmarks which address the best, most reliable,
backward and forward-compatible way to get access to any DOM node.
Your problem would have been halfway solved if only you had looked into
the javascript console for the error message. There is normally a
warning and a recommendation to use getElementById in the javascript
console instead of referring to document elements with id/name.
GΓ©rard
--
remove blah to email me
[Back to original message]
|