lawrence said:
Forgive the ignorant question, but what is isMozilla? Is that a
constant that exists in Mozilla, to let you know that you're dealing
with Mozilla? Where did you find it? Can you point me to some
documentation regarding it?
It falls in the same place the isIE variable falls. Its an utterly
flawed attempt to detect the browser when the browser doesn't matter.
The only way that isMozilla/isIE would be accurate in that scenario is
if its defined like this:
if(div.addEventListener) isMozilla = true;
All of it is more predictable when written something like this:
if (div.addEventListener) {
div.addEventListener("click", clicked, false);
} else if (div.attachEvent) {
div.attachEvent("onclick", clicked);
}
Even then, div might not be a good variable name.