CTools modal window, return message in the same modal window

I wanted to have a confirmation message in modal window, instead of closing the modal and having it on normal page. All that is needed is to check form_state after submit and add this part of code in form function

function my_module($form, &$form_state)
{
 $form = array();
....
 

 if ( $form_state['submitted']){
  $output[] = ctools_modal_command_display('Success', '