BarrMan
08-31-2008, 11:32 AM
Hey,
I'm trying to make a DropDown menu but I'm having a bit of a problem on doing so.
I'm trying to create a function which contains the event variable for firefox (e) and also a second variable for the obj.
I'm not sure how to achieve both at the same time.
Here's what I've got so far:
obj.onmouseout = (function(opts,e)
{
var oThis = this;
e = typeof(e)=='undefined'?window.event:e;
return function()
{
if(document.all&&!opts.contains(e.toElement))
tmr = window.setTimeout(function(){closemenu(opts);},delay);
else if(!contains(opts, e.relatedTarget))
tmr = window.setTimeout(function(){closemenu(opts);},delay);
return false;
}
})(opts,e);
The code above does not work, it informs of an error of unknown variable e.
Thanks.
I'm trying to make a DropDown menu but I'm having a bit of a problem on doing so.
I'm trying to create a function which contains the event variable for firefox (e) and also a second variable for the obj.
I'm not sure how to achieve both at the same time.
Here's what I've got so far:
obj.onmouseout = (function(opts,e)
{
var oThis = this;
e = typeof(e)=='undefined'?window.event:e;
return function()
{
if(document.all&&!opts.contains(e.toElement))
tmr = window.setTimeout(function(){closemenu(opts);},delay);
else if(!contains(opts, e.relatedTarget))
tmr = window.setTimeout(function(){closemenu(opts);},delay);
return false;
}
})(opts,e);
The code above does not work, it informs of an error of unknown variable e.
Thanks.