Alex Rivera | Logout

How to disable esc key in html page using javascript or jquery

Asked 2011-07-18T06:22:10.447
9

I want to disable the ESC key in an HTML page. How can I do this?

I have a form which is appearing as jQuery UI Dialog. Here if I click the ESC key, the form will close. I want to disable that.

Edit
Report

1 Answer

4

The best way to do this is to figure out which dialog library you are using (colorbox? jquery ui? shadowbox) and disable the esc key (for example, in Colorbox you can set the escKey option to false).

answered 2011-07-18T06:35:19.710

Your Answer