...

View Full Version : What does this do?



ellisd5
08-29-2008, 02:03 PM
I am re-doing some code that I didn't write to fix some memory leakage in the code, can anybody tell me in the following bit of code, does just onmouseover get that function assigned to it or is all three events?


this.layer.onmousedown =
this.layer.onmouseup =
this.layer.onmouseover = function (oEvent) {
oEvent = oEvent || window.event;
oTarget = oEvent.target || oEvent.srcElement;

if (oEvent.type == "mousedown") {
var key = oTarget["title"];
oThis.textbox.value = key;
oThis.hideSuggestions();
} else if (oEvent.type == "mouseover") {
oThis.highlightSuggestion(oTarget.innerText);
} else {
oThis.textbox.focus();
}
};

Thanks
Dale

liorean
08-29-2008, 05:00 PM
All three of them.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum