Index: popups.js =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/popups/popups.js,v retrieving revision 1.9.2.15 diff -u -r1.9.2.15 popups.js --- popups.js 17 Nov 2008 23:51:49 -0000 1.9.2.15 +++ popups.js 18 Nov 2008 22:01:36 -0000 @@ -435,6 +435,13 @@ Drupal.popups.openContent(data.title, data.messages + data.content, options); } else { // Done. + if (options.afterSubmit) { // Execute an afterSubmit callback if available. + var afterSubmitResult = eval(options.afterSubmit +'(data, options)'); + if (afterSubmitResult == false) { + return; + } + } + if (options.reloadWhenDone) { // Force a non-ajax, complete reload of the page. location.reload(); }