From thomas@roundcube.net Fri Sep 16 16:56:26 2016 From: Thomas Bruederli To: dev@lists.roundcube.net Subject: Re: [RCD] Plugin - AJAX GET request to cross domain Date: Fri, 16 Sep 2016 16:56:22 +0200 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3042925094706837443==" --===============3042925094706837443== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Mon, Sep 12, 2016 at 11:21 AM, Jakob Bachhuber wrote: > [...] > > Of course, I have read the documentation. I also analysed some other > plugins, but it is still just random guessing for me. The relevant part for you is probably here: https://github.com/roundcube/roundcubemail/wiki/Plugin-API#ajax-requests-and-= callbacks > In my php I do: > $this->register_action('plugin.someaction', array($this, 'actions')); > > and > > function actions($args) > { > echo ''; > echo ''; > $this->rc->ouput->send(); > } The way to pass data back to the client is not using `echo` but send it a "command" for which your plugin has already registered an event listener: $rcmail->output->command('plugin.somecallback', $args); Makes sense? ~Thomas --===============3042925094706837443==--