I have a dialog box with an ok button, the ok button works, but i want the user to be able to press enter on the keyboard as well, this is the code i have, any suggestions?
function showDialog()
{
$('#dialog').dialog('destroy');
$('#dialog').show();
$('#dialog').html();
$("#dialog").dialog({
resizable: false,
modal: true,
height: 120,
width: 370,
overlay: {
backgroundColor: '#000',
opacity: 0.9
},
title:"Enter possible answer"
});
}
1 Answer