Julia Briggs said:
Hi there! Thanks for helping me with this. Yes, actually I need to
run the something() event before the page is actually submitted, right
at the moment the second # is pressed....How would that work?
It's almost always a bad idea to audit individual keystrokes,
because people don't type perfectly. If they accidentally hit
a second "#" and you fire off some action as they're hitting
the backspace key, they're going to be annoyed.
Both of the methods I posted check the value before anything is
actually submitted. The onsubmit technique prevents submission
if there is a second "#". Of course, you also need to audit on
the server side, because some users may have scripting disabled.