philjhanna wrote:
[color=blue]
> Does anyone know why I can't add return false with addEventListener in
> firefox (1.0.6).[/color]
Because Firefox/Mozilla will ignore any result returned from a function
registered with addEventListener. If you read the DOM specification for
the EventListener interface you will see that it says there is 'no return value'.
See the following references:
http://www.mozilla.org/docs/dom/domr..._el_ref31.html http://www.w3.org/TR/2000/REC-DOM-Le...-EventListener
or more specifically
(at
http://www.w3.org/TR/2000/REC-DOM-Le...binding.html):
Object EventTarget
The EventTarget object has the following methods:
addEventListener(type, listener, useCapture)
This method has no return value.
The type parameter is of type String.
The listener parameter is a EventListener object.
The useCapture parameter is of type Boolean.
removeEventListener(type, listener, useCapture)
This method has no return value.
The type parameter is of type String.
The listener parameter is a EventListener object.
The useCapture parameter is of type Boolean.
dispatchEvent(evt)
This method returns a Boolean.
The evt parameter is a Event object.
This method can raise a EventException object.
Object EventListener
This is an ECMAScript function reference. This method has no return value.
The parameter is a Event object.