Reputation:
I have the following JQuery popup window in my page.
$('#SubSkill').dialog({
autoOpen: false,
draggable: false,
resizable: false,
bgiframe: false,
modal: true,
width: dWidth,
height: dHeight,
title: "Enter Job Sub Skill Information",
open: function (type, data) {
$(this).parent().appendTo("form");
}
});
When I clisk the Escape
key, it closes. How do I prevent the closing of the popup when this key is pressed?
Upvotes: 2
Views: 77
Reputation: 5947
add the following to your function.
closeOnEscape: false
Upvotes: 0
Reputation: 2403
You must use the closeOnEscape property, and set it to false,
Here is your new script:
$('#SubSkill').dialog({
autoOpen: false,
draggable: false,
resizable: false,
bgiframe: false,
modal: true,
width: dWidth,
height: dHeight,
title: "Enter Job Sub Skill Information",
open: function (type, data) {
$(this).parent().appendTo("form");
},
closeOnEscape: false
});
Upvotes: 0
Reputation: 38102
You can use closeOnEscape: false
option:
$('#SubSkill').dialog({
closeOnEscape: false,
autoOpen: false,
draggable: false,
resizable: false,
bgiframe: false,
modal: true,
width: dWidth,
height: dHeight,
title: "Enter Job Sub Skill Information",
open: function (type, data) {
$(this).parent().appendTo("form");
}
});
Upvotes: 1