Changes between Version 10 and Version 11 of Doc_Plugins


Ignore:
Timestamp:
Jun 1, 2009 11:52:36 AM (4 years ago)
Author:
thomasb
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Doc_Plugins

    v10 v11  
    155155{ 
    156156  $rcmail = rcmail::get_instance(); 
    157   $rcmail->output->command('plugin.somecallback', array('response' => 'done.')); 
     157  $rcmail->output->command('plugin.somecallback', array('message' => 'done.')); 
    158158} 
    159159}}} 
     
    161161''Processing response data on the client again:'' 
    162162{{{ 
    163 function some_callback_function(e) 
    164 { 
    165   $('#somecontainer').html(e.response); 
    166 } 
    167 }}} 
     163function some_callback_function(response) 
     164{ 
     165  $('#somecontainer').html(response.message); 
     166} 
     167}}} 
     168 
     169Please note that the callback function can only receive one single argument. Therefore you need to pack all the response data into an array which will automatically be converted into a javascript object. 
    168170 
    169171