Php 如何在joomla插件(而不是模块)中调用ajax帮助器
我想在joomla插件中调用ajax到helper文件。我的文件夹结构是myplugin.php、myplugin.xml、helper.php、tmpl->default.php。我从default.php调用ajax,但它返回html。这是我的密码Php 如何在joomla插件(而不是模块)中调用ajax帮助器,php,jquery,ajax,joomla,Php,Jquery,Ajax,Joomla,我想在joomla插件中调用ajax到helper文件。我的文件夹结构是myplugin.php、myplugin.xml、helper.php、tmpl->default.php。我从default.php调用ajax,但它返回html。这是我的密码 jQuery.ajax({ type: "POST", url: "index.php?option=com_ajax&format=raw&plug
jQuery.ajax({
type: "POST",
url: "index.php?option=com_ajax&format=raw&plugin=myplugin",
data: {"Type": "insert"},
cache: false,
success: function (response)
{
请帮助解决我的错误。请检查,但我使用的插件不是模块。当我将此代码用于模块时,它工作正常。