Calling a function upon modal dialog close?

Calling a function upon modal dialog close?

Hi guys,

I have a this within a function in a php class file. Is it possible to call another function when the close button for deleting items is pressed? If so, how do I go about calling the public function deleteSection() ?

Thanks for your help, really appreciated! RJP100

  1.     $(function() {
            $("#dialog-message").dialog({
                modal: true,
                buttons: {
                    \'Delete all items\': function() {
                        $(this).dialog(\'close\');
                    },
                    Cancel: function() {
                        $(this).dialog(\'close\');
                    }
                }
            });