Print Drupal status messages using AHAH
This is how to print out Drupal status messages when using AHAH.
<?php
$output = theme('status_messages');
//$output = theme('status_messages', "warning"); //if only "warning":s should be displayed.
$output .= $my_other_output;
drupal_json(array('status' => TRUE, 'data' => $output));
?>