Closing A Dialog UI From Inside An iFrame

Closing A Dialog UI From Inside An iFrame

I am creating a jquery UI dialog, which basically is an iFrame. I am running into a huge problem though, as I need to be able to close the jquery dialog from inside the page called within the iframe. The problem of course if that the dialog has been binded to the parent page, not the iframe page.

Is this possible to close the dialog from the iframe page? Can I pass a reference to the dialog object into the iframe page, so then the iframe page can close the dialog? Thanks.