跳至内容

欢迎!

This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

此问题已终结
作为版主,您可以批准或拒绝该答案。
接受 拒绝
116 查看

After you install plugin into your system, how can you build the ajax function?

​1. Find the ajax plugin file (plugins/ajax/Your Ajax Plugin Name)

​2. There are some key points when building an AJAX function in J4.

​a. function name is onAjax{your plugin name}

​b. After onAjax, the plugin name should start with an uppercase letter, and the rest should be lowercase.

​c. The function name after onAjax should match your plugin name, not be randomly chosen.

​d. You can check the plugin name in the system backend->system->plugin->find your plugin


How to call it?

​1. It is very simple to call it, you can direct add an url after your domain like

​domain/ajaxURL


Ajax URL format: 

?option=com_ajax&plugin=p​lgrenewalsystemtemplatemessage&format=json

The format is fix, just change the plugin name to your plugin name


Completed ajax url

www.domain.com/?option=com_ajax&plugin=plgrenewalsystemtemplatemessage&format=json

形象
丢弃

您的回复

请大家尽量给个实质性的回答。如果您想回答这个问题或发表评论,只需 使用评论工具。请记住,您可以随时修改您的答案。 - 不用重复回答同样的问题。另外,请不要忘记投票 - 它确实有助于选择最好的问题和答案!

相关帖文 回复 查看 活动
0
3月 25
83
0
3月 25
77
0
2月 25
77
0
2月 25
113
0
3月 24
86