logo       

syntax passing event params ?: msg#00009

mozilla.devel.dom

Subject: syntax passing event params ?


When specifying an event such as

element.addEventListener("load", foo, true);

where foo is a function

function foo()
{
window.frames[0].method() // call method in first doc succeeds
}

However if I pass an argument

element.addEventListener("load", foo(arg), true);

where foo is defined as

foo = function(param)
{
window.frames[0].method() // call method in first doc fails
}


Is the syntax correct - should it work?


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise