[Pmwiki-users] thanks scott... one more for you all
Davis, James C.
jdavis at cob.tamucc.edu
Wed May 7 12:50:13 CDT 2003
> Why is it when you hit Esc it runs the Reset button? Is that=20
> an IE thing,
> html thing, or is there some kind of wiki override to it? I=20
> keep hitting
> <esc> :wq and losing all my changes.
>=20
> J.R.
This was annoying me too so I have come up with a way to get IE to not =
reset a form when you press escape. Basically, you use onKeyDown to trap =
the escape keypress and then disable and re-enable the textarea field. =
Don't ask me why this works, but it prevents IE from resetting the form. =
Just trapping the escape keypress doesn't work because when it returns =
from the function called with onKeyDown it still resets. See an example =
at: http://lex.tamucc.edu/~jdavis/trapEscape.html I don't think this =
will cause problems with other browsers, but I haven't tested it =
thoroughly. It's not the prettiest solution, but it's the only thing I =
could get to work. If I come up with a better way, I'll post it to the =
list. The problem is that reset is not handled by javascript =
(javascript's reset() can be overridden with a user defined function, =
but hitting escape or a reset button has nothing to do with javascript). =
There seems to be no documented way to disable the escape=3Dreset =
"feature" of IE, so you just have to trick it with the quick disable =
re-enable of the textarea.
James Davis
Network Manager
College of Business
Texas A&M University - Corpus Christi
(361) 825-5926
jdavis at cob.tamucc.edu
More information about the pmwiki-users
mailing list