jquery close button click

jquery close button click

Dear all,

I am using jquery modal poup to open a page (example from parent page,a.spx, iam opening the child page,b.aspx.)

Following is the code


<script type="text/javascript">
    $(function() {

        $("[id$='lnkbtn']").click(function() {
            var str = $(this).attr("details");
            var page = ('../b.aspx?no=' + str);
            var $dialog = $('<div></div>').html('<iframe style="border: 0px; " src="' + page + '" width="100%" height="100%"></iframe>').dialog({ autoOpen: false, modal: true, height: 500, width: 900});
            $dialog.dialog('open');
        });
    });
</script>










I want to refresh my parent page when the user clicks the clse button(x) on the modal popup (I.E b.aspx).


I went thru the following link but i am not getting the expected op.

http://jsbin.com/obafo/590/edit

if you go through the code , he has a div and he is calling the dialog in js.

In my case its not the div, its a web page so how can i do that?

<div id="dialog">
  <button>button in dialog</button>
</div>


$("#dialog").dialog({
  close: function(event, ui) {
    if ( event.originalEvent && $(event.originalEvent.target).closest(".ui-dialog-titlebar-close").length ) {
      $("body").append("do some  stuff<br>");
    }
  }
}).find("button").click(function() {
  $("body").append("just close  dialog<br>");
  $(this).closest(".ui-dialog-content").dialog("close");
});








Thanks

Nick