replacing an onclick event

Giganews Newsgroups
Subject: replacing an onclick event
Posted by:  John Livermore (john.livermo…
Date: Tue, 22 Jul 2003

From javascript in IE, I have a need to hijack the onclick event for
an element and replace it dynamically with my own.

I have tried the following...

control.onclick = 'myHandler();';

but this doesn't seem to do the trick.  How do I go about doing this?