i want when click on close (X) button on dialog do some javascript function .
i test some code but no work for me .
do like this
$(#dialog).close
{
function one();
function two();
...
}
tset this and not work :
<script>
function beh()
{
$(document).ready(function() {
$("#dialog").dialog({
beforeClose: function(event, ui) {
alert('hi');
},
width: 660,
height: 495,
closeOnEscape: false,
hide: "fadeout",
resizable: false,
}
);
});
}
</script>
You should attach a callback to the
beforecloseevent like so:then when you close the dialog, it should fire: