diff --git a/src/webui/scripts/client.js b/src/webui/scripts/client.js
index 2aadbd045..8d53840c0 100644
--- a/src/webui/scripts/client.js
+++ b/src/webui/scripts/client.js
@@ -143,6 +143,10 @@ window.addEvent('domready', function(){
});
+function closeWindows() {
+ MochaUI.closeAll();
+}
+
// This runs when a person leaves your page.
window.addEvent('unload', function(){
diff --git a/src/webui/upload.html b/src/webui/upload.html
index 3a3dd5d61..2d912ff71 100644
--- a/src/webui/upload.html
+++ b/src/webui/upload.html
@@ -11,6 +11,7 @@
function showSuccess() {
$('myiframe').addClass('invisible');
$('successMessage').removeClass('invisible');
+ window.parent.closeWindows();
}
diff --git a/src/webui/uploadframe.html b/src/webui/uploadframe.html
index ac2cb137f..c413f9c0e 100644
--- a/src/webui/uploadframe.html
+++ b/src/webui/uploadframe.html
@@ -6,7 +6,6 @@
-