Skip to Content

Welcome!

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.

This question has been flagged
As a moderator, you can either validate or reject this answer.
Accept Reject
70 Views

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

Avatar
Discard

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Related Posts Replies Views Activity
0
Mar 25
47
0
Mar 25
31
0
Feb 25
40
0
Feb 25
54
0
Mar 24
71