Yes, this should be possible. However, as far as I know, these dialogs are modal (http://en.wikipedia.org/wiki/Modal_window). That means the user won't be able to continue until the dialog has been closed first.
What you want to do seems rather complex and could eat up a lot of performance. Do...