var parent_window = parent.dialogArguments; var parent= parent_window.document.getElementById("parent");