Michael Hill wrote:
I received an error on the addEventListener line in this function.
function load()
{
el = document.getElementById("t");
el.addEventListener("click", l_func, false);
}
I am using IE 6.0.
Does IE use something else?
There is no current IE version supporting addEventListener which is a
method defined in the W3C DOM Level 2 Events module which IE doesn't
support.
IE 5.5 and IE 6 on Windows support
el.attachEvent('onclick', l_func)
so the difference is that you need to use 'oneventname' as the first
argument instead of 'eventname' and that there is only a second argument
, the function. The event model in IE only supports event bubbling so
there is no third argument.
--
Martin Honnen
http://JavaScript.FAQTs.com/