Using a dialog

$(document).ready(function() {
  $("#dialog").dialog({
    buttons: {"Ok": function() { $(this).dialog("close"); } } 
  });
});
    


The jQuery Code START
    
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

<script type="text/javascript">
  $(document).ready(function() {
    $("#dialog").dialog({
      buttons: {"Ok": function() { $(this).dialog("close"); } } 
    });
  });
  </script>
</head>

<body>
  <h1>Using a dialog</h1>
    <div id="dialog" title="Bill's First jQuery Dialog">
    <pre>
    $(document).ready(function() {
      $("#dialog").dialog({
        buttons: {"Ok": function() { $(this).dialog("close"); } } 
      });
    });
    </pre>
</div>