I ran into a speed bump of sorts when attempting to assign an object instance method as a DOM event handler, there's some information floating around the net, but a post on the topic can't hurt. Something like this on the server side would usually fit the bill: spaghetti.Attributes.Add(" onmousemove ", this .Id+" .myMouseMoveHandler(event) "); However since we want to create this same result completely on the client-side we'll need to do this in the class constructor, something like this: document .getElementById('spaghetti').onmousemove = this .myMouseMoveHandler; May work in some situations, but arguments cannot be passed when assigning this way, also, unless the handler function is defined within the constructor it won't be available yet. Something like this: document .getElementById('spaghetti').onmousemove = new Function ('e',id+'.myMouseMoveHandler(e);'); Again will only work if the handler method has been defined within the constructor, but at least an argument may be passed. Next we add the dreaded eval so it can be evaluated on the fly, allowing us to define the handler method for the object instance outside of the constructor: document .getElementById('spaghetti').onmousemove = new Function ('e',' eval (" '+id+'.myMouseMoveHandler(e); ");'); Figured it was just convoluted enough to warrant a blog post. Share this post: email it! | bookmark it! | digg it! | reddit!