I'm working on the following onmouseover function in javascript
function fnNavMouseOver(evt) {
alert(evt.target);
var eSrc
evt = (evt) ? evt : (window.event) ? window.event : ""
eSrc = (evt.target) ? evt.target : evt.srcElement
alert(eSrc);
}
I'm under the impression that in firefox the event should be passed into the function. However evt seems to be coming in as null. Is there anything that could be causing this?
Edit :
The code that calls this method works like this
ButtonHTML += "<img onmouseover='fnNavMouseOver()' id='" + ButtonId + "Norm' src='" + ImgPath + "_n.jpg' style='border-style:none;z-index=102;position:absolute;left:0px;top:0px'>";
That string then gets appended to a div on the page. I realize this really isnt ideal but I'm working with an old framework and trying to shoe horn some new functionality in.