This pen shows a setup for a generic ModalDialog JavaScript module. The idea is the module should make available some generic configuration options and not have any knowledge about the structure beyond some mandatory elements.
It uses another JavaScript module, the Intermediary , to be told when the dialog should be shown and to inform others of when the dialog is closed again.
Below you will find some options to tweak the text and appearance of the ModalDialog and a button to make the dialog visible.