Hi, hope my explanation will help you.
First of all make sure that you have referenced to jquery libraries: for example
<head>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/jquery-ui.min.js"></script>
<link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/themes/ui-lightness/jquery-ui.css" rel="stylesheet" type="text/css" />
</head>
Then in your page declare some pop-up dialog:
<div id="CheckMessagesDialog" style="display: none">
</div>
<button id="testBtn">Press me</button>
On page ready event handler add few initialization lines:
$(document).ready(function () {
$('#MessagesDialog').dialog({
autoOpen: false, modal: true,
width: 450, height: 400,
hide: "explode", show: "blind",
closeOnEscape: true,
buttons: {
"Close": function () {
$(this).dialog("close");
}
},
open: function (event, ui) {
}
});
}
$('#testBtn').click(function(){
if ($("#MessagesDialog").dialog("isOpen") === true) {
$("#MessagesDialog").dialog("close");
}
$("#MessagesDialog").dialog({ title: "Hello tittle" });
$("#MessagesDialog").dialog('open');
});