I've got a simple (should be) function for toggling the display property that is typically called by an onClick event. However, it doesn't work in NS6 (yes, my sniffer variables work ok, they've been tested) After various iterations, here's how the function looks now.
Code:
function toggleDisp(node) {
if (is_ie4up)
node.style.display = (node.currentStyle.display == 'none') ? 'block' : 'none';
else if (is_gecko)
node.style.display = (node.display != 'block') ? 'block' : 'none';
else
alert('Your browser does not have the javascript support for these menu features.\nPlease upgrade to the most recent version of Internet Explorer, Netscape, or Mozilla.');
}
Why don't you just give an example of this function in action?
What jumps out immediately to me is that you are passing (event.target || event.srcElement) as the argument, which would cause a discrepancy if you actually clicked on the text (as IE is incapable of firing events on text nodes).
event.currentTarget would refer to whatever element you have the onclick attribute on, because the event would have bubbled up to it.
Ok, and jkd, I tried to make the point that I didn't believe it was an acutal programmatic "bug" in Gecko, but rather a bug in my coding that didn't handle it correctly