While I managed to get a working AJAX call, it won't works with my already created actions, not on a newly created one.
My Typoscript looks like this:
lib.AJAXPrototype= PAGE
lib.AJAXPrototype {
typeNum = 896571
config {
disableAllHeaderCode = 1
xhtml_cleaning = 0
admPanel = 0
debug = 0
no_cache = 1
additionalHeaders = Content-type:text/html
}
}
AJAX_Plugintyp < lib.AJAXPrototype
AJAX_Plugintyp {
typeNum = 89657201
10 < tt_content.list.20.myext_myplugin1
}
My AJAX call looks like this:
$.ajax({
url: "index.php",
data: "tx_myext_myplugin1[controller]=Mycontroller1&tx_myext_myplugin1[action]=ajax&type=89657201",
success: function(result) {
alert(result);
}
});
My ajaxAction:
/**
* action ajax
*
* @return void
*/
public function ajaxAction() {
$test = 'sometext';
$this->view->assign('test', $test);
}
My Ajax.html (View/Output):
<f:section name="main">
<f:flashMessages />
<div id="ajaxd">{test}</div>
</f:section>
I won't get anyoutput from this, I created this Action just for the Ajax Output. However, if I use any other controller/action combination, it works! What could I possibly have done wrong with the new Action?