Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
plugin_tutorial_javascript [2014/05/21 20:14]
Christoph M. Becker [Embedding in the Document] added footnote
plugin_tutorial_javascript [2018/10/26 15:33] (current)
Line 80: Line 80:
  
 <​code=php>​if (isset($_GET['​myplugin_xhr'​])) { // handle XHR of myplugin <​code=php>​if (isset($_GET['​myplugin_xhr'​])) { // handle XHR of myplugin
 +    while (ob_get_level()) { // purge existing output buffers
 +        ob_end_clean();​
 +    }
     header('​Content-Type:​ text/​plain'​);​ // set the appropriate Content-Type header     header('​Content-Type:​ text/​plain'​);​ // set the appropriate Content-Type header
     echo $plugin_tx['​myplugin'​]['​response'​]; ​ // sent the response     echo $plugin_tx['​myplugin'​]['​response'​]; ​ // sent the response
 
Except where otherwise noted, content on this wiki is licensed under the following license: GNU Free Documentation License 1.3
Valid XHTML 1.0 Valid CSS Driven by DokuWiki