dialog beforeClose event SOLVED

dialog beforeClose event SOLVED

Hi

I feel first obligated to thank the entire community for an incredible open source product.

Secondly, I'm still getting my head wrapped around how the event model works for triggered events.

I am binding a global dialog close handler and I need to take some action on the dialog's contents before the dialog "goes away".

I have the handler in place, but am grasping at the event object passed.  I need the ID of the original div that was used to create the dialog.... I'm trying something like this:

  1. beforeClose: function(e, ui) {
  2.                         alert($(e.currentTarget).parent().attr('id'));
  3.                     }

Can anyone shed some light on this?


The solution here is to pay attention:
  1. $(e.target)[0].id
This should return the id of the original div used to create the dialog.