bennyboywonder Posted March 4, 2007 Share Posted March 4, 2007 *edit* ok, this is a small part of a script from a tutorial, and when I move document.onMouseDown=startDrag; document.onMouseUp=stopDrag; outside of the window.onload handler (wasn't sure why he did that anyway) then it works. HOWEVER this only works when I include it in the main HTML document. If the script is imported via a js file, it doesn't work *edit* trying to do a drag and drop script for my website. Halted at the very outset. this just WILL NOT WORK. help me here function startDrag(e) { alert("dragging started"); } function stopDrag(e) { alert("dragging stopped"); } window.onload = function() { document.onMouseDown=startDrag; document.onMouseUp=stopDrag; } Quote Link to comment Share on other sites More sharing options...
bennyboywonder Posted March 4, 2007 Author Share Posted March 4, 2007 ok. ignore this, I am a moron. I had previously already defined two blank startdrag functions as placeholders and it was calling them instead Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.