hi,
on button click id user credential is not valid then register this script from server side.
function DisplayDialog() {
$("#dialog").dialog({
buttons: {
'OK': function() {
$(this).dialog('close');
},
'Cancel': function() {
$(this).dialog('close');
}
}
})
}
For more information check this link
http://jqueryui.com/dialog/[
^]