Add the following code segment in the open event of dilog
$( "#dlgSearch").dialog({
autoOpen: false,
bgiframe: true,
width: 600,
//height: 225,
modal: true,
resizable : false,
open: function() {
//Keyboard event of jquery’s dialog (retrieve by pressing enter after inputting)
$(this).bind("keypress.ui-dialog", function( event) {
if (event.keyCode == $.ui.keyCode.ENTER) {
alert("enter pressed!");
}
});
},
buttons: {
"Cancel": function() {
$(this).dialog("close");
},
"Search": function() {
}
},
close: function() {
}
});