Index: js/ajax-responder.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/js/ajax-responder.js,v
retrieving revision 1.7
diff -u -r1.7 ajax-responder.js
--- js/ajax-responder.js	22 Apr 2009 22:31:28 -0000	1.7
+++ js/ajax-responder.js	1 Jun 2009 08:50:38 -0000
@@ -210,6 +210,12 @@
     $.extend(Drupal.settings, data.argument);
   },
 
+  messages: function(data) {
+    $('div.messages').remove();
+    $('form:not([id*="search"]):first').before(data.data);
+    Drupal.attachBehaviors($('div.messages'));
+  },
+
   restripe: function(data) {
     // :even and :odd are reversed because jquery counts from 0 and
     // we count from 1, so we're out of sync.
Index: includes/ajax.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/includes/ajax.inc,v
retrieving revision 1.7
diff -u -r1.7 ajax.inc
--- includes/ajax.inc	11 May 2009 22:09:53 -0000	1.7
+++ includes/ajax.inc	1 Jun 2009 08:50:38 -0000
@@ -58,6 +58,9 @@
  * - settings
  *   - argument: An array of settings to add to Drupal.settings via $.extend
  *
+ * - messages
+ *   - no arguments since content is retrieved from drupal_get_messages().
+ *
  * Commands are usually created with a couple of helper functions, so they
  * look like this:
  *
@@ -295,6 +298,19 @@
 }
 
 /**
+ * Create a messages command for the AJAX responder.
+ *
+ * This will first remove previous status messages before attempting to add
+ * the status messages with content from drupal_get_messages().
+ */
+function ctools_ajax_command_messages() {
+  return array(
+    'command' => 'messages',
+    'data' => theme('status_messages'),
+  );
+}
+
+/**
  * Force a table to be restriped.
  *
  * This is usually used after a table has been modifed by a replace or append
