541reads

javascript mousemove DOMview story

sorry for another post, but I don't get why javascript is being so dam awkward.... or I'm being a but thick! There are three variations of code below, the desired effect is to have the function fired when the mouse if held down on an element. The first two fire as soon as the page is loaded, and the third one never fires at all! How else do I do it!? Code: newHeader.onmousedown = setHeldWindow(tabID); Code: document.getElementById('header'+tabID).addEventListener('mousedown',setHeldWindow(tabID),false); Code: newHeader.onmousedown = "setHeldWindow(&qu

The content of this field is kept private and will not be shown publicly.
To prevent automated spam submissions leave this field empty.
CAPTCHA
Human?
Image CAPTCHA
Enter the characters shown in the image.