How can I detect a button click for ANY button? I've found posts on how to intercept the submit behavior, but I need to intercept clicks on buttons like bold, underline, spell check, etc.
Basically, for my particular use the end user will have to take a "test" before using the editor to show that he/she can find the appropriate buttons. Don't ask why! I'll ask them things like "click the spell check button" and I need to 1) detect that they clicked that button so I can provide them with the next task, and 2) keep the spell check (or bold, or underline, or whatever it is) from actually happening.
Any ideas as to how I can accomplish this?
Thanks in advance for any help you can provide!
Wed, 03/04/2009 - 20:21
#1
Re: detect button click (for ANY button)
Thanks!
Re: detect button click (for ANY button)
I don't know that this is an easy question. In theory, you can attach to the click (or mousedown, or mouseup) event of the main HTML body and inspect the event target (e.g. Mozilla event.target manpage). Whether or not that works with the editor, I don't know...