Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder ellisd5's Avatar
    Join Date
    Jun 2002
    Location
    Uk
    Posts
    160
    Thanks
    5
    Thanked 0 Times in 0 Posts

    What does this do?

    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?

    Code:
        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
    Dale Ellis
    __________________

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    Ume, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    All three of them.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • Users who have thanked liorean for this post:

    ellisd5 (08-29-2008)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •