There are two versions of code. The first version is there is a main page containing an iframe and dialog . The iframe will load the dia.html into the parent and fire it as