All,
I have a generic script to handle events. (NN/IE only)
function addEvent(elemen tObject, eventName, functionObject)
{
if(document.add EventListener)
elementObject.a ddEventListener (eventName, functionObject, false);
else
if(document.att achEvent)
elementObject.a ttachEvent("on" + eventName, functionObject) ;
}
Now, what I wanted to do was pass a parameter to the functionObject, but
this is apparently not possible.
How can I determine what object caused the event in the functionObj?
FWIU, the "this" object is fine in NN, but in IE, it refers to window.
addEvent(docume nt.getElementBy Id("myE"),"clic k",myFunctio n);
function myFunction()
{
// I need a reference to document.getEle mentById("myE") or whatever
object triggered this function to be called
}
If someone knows a way to pass a parameter, that is preferable. :)
TIA
--
--
~kaeli~
Local Area Network in Australia:... the LAN down under.
Comment