Q:

Trigger the event which happens when I click the 'x' button on a TinyMCE modal dialog (like the advimage dialog)

Please see this comment and the rest of the thread: [question]: TinyMCE Image URL select
Thank you!

A:

The 'x'-Button element is the element you get using $(".mceClose"). So you are able to assign an event handler there (you need to assign the handler when the dialog is open/visible) else you won't find such an element and the assignment will fail. Here it is:
$(".mceClose").click(function() {
  alert('Handler for .click() called.');
});

