Firefox and DOCTYPE messes javascript -
02-20-2007
, 01:04 AM
From what I have read, there is a permanent bug with Firefox to interpret
DOCTYPE declaration so that style sheet support changes unexpectedly. I have
a very simple javascript function which should toggle the visibility
parameter of a <div>:
DivId.style.visibility = 'hidden' (and 'visible').
Without DOCTYPE declaration it works fine on all browsers I tried, but add
any type of DOCTYPE declaration for the page and Firefox just ignores the
function. It appears to be limited to style parameter tweaking.
So why add the DOCTYPE, you may say. Obviously, without DOCTYPE Firefox has
some own ideas of interpreting style sheets as well, and it would be an even
worse situation.
Any ideas for solution??
Harri |