【发布时间】:2015-08-20 16:24:59
【问题描述】:
根据后端 API:https://docs.typo3.org/typo3cms/CoreApiReference/JavaScript/Ajax/Backend/Index.html 我可以使用每个库在 TYPO3 后端进行 AJAX 调用。
我收到成功消息,但我的 params 数组始终为空:
控制器
public function renderShowModal($params = array(), \TYPO3\CMS\Core\Http\AjaxRequestHandler &$ajaxObj = NULL){
var_dump($params);
}
jQuery
$.ajax({
type: 'POST',
url: TYPO3.settings.ajaxUrls['Controller::renderShowModal'],
data: {
"test": "bar"
},
success: function (result) {
console.log(result);
},
error: function (error) {
console.log(error);
}
});
我遗漏了什么或者我必须如何发送我的数据?
它甚至不是这样工作的:
{"tx_ext_bm[test]": "bar"}
提前致谢
【问题讨论】:
-
没有人能提供一个在 TYPO3 后端使用 jQuery Ajax 的工作示例吗?
标签: extbase typo3-6.2.x