You are here: Re: XHTML Javascript compatability with Firefox « HTML « IT news, forums, messages
Re: XHTML Javascript compatability with Firefox

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

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация