Questions tagged [ajax]

AJAX (Asynchronous JavaScript and XML) is a technique for creating seamless interactive websites via asynchronous data exchange between client and server. AJAX facilitates communication with the server or partial page updates without a traditional page refresh.

Filter by
Sorted by
Tagged with
3
votes
2answers
209 views

Adding ajax call in a module for Joomla 4

I'm trying to add an ajax call to Article Latest module. I added the code below to /modules/mod_articles_latest/src/Helper/ArticlesLatestHelper.php public static function getAjax() { $data ...
1
vote
1answer
30 views

Ajax call from module default.php file in order to fulfill a sql query

I have a fully working module in Joomla, but I'm struggling with the last piece which is sending a value from Javascript in my default.php file into the helper file, where it will be used in a sql ...
1
vote
0answers
43 views

Simple Ajax Request Without Component/Module/Plugin

I am trying to create a simple login popup. From the shared image of UI, you can see, a login button(top right) which opens a popup for login form. https://prnt.sc/1mc5ppq Now, I want to pass the ...
0
votes
1answer
30 views

Get html code from an internal link in a module

I need to get the html code from the joomla internal link, and transfer the code to the module My code default.php <?php defined( '_JEXEC' ) or die; ?> <div class="container" id=...
1
vote
1answer
30 views

Submitting a form in pure JS

How to get the formDate in the controller? my HTML <form id="myform" > <input type="number" name="jform[option][1]"> <input type="number" ...
1
vote
2answers
54 views

Controller method does not get data passed through jQuery.ajax()

I am developing a Joomla component. In javascript I use jQuery.ajax() for making a (php) controller method put data (from javascript) into the database. However, after installing the component on one ...
0
votes
1answer
73 views

Call a function using AJAX from a Joomla-View to retrieve data from the DB

i have coded a little component to administrate books for a histroy club. I added some views to deiplay different tables with book date. So far everythign works. In fact the DB access and the building ...
0
votes
0answers
17 views

Save an article with MVC methods from MY controller without "The security token did not match"?

I'm using AJAX to allow users to add an event, and want to create a new Article when they do that. I've found a number of answers that address using a controller in this manner, and finally found the ...
2
votes
3answers
76 views

Joomla Ajax in Module from Administrator not work

I have a module that creates thumbnails from the main image and over time the hosting fills with images, for that reason I want to add a maintenance button that deletes the previous images. It is from ...
0
votes
1answer
63 views

What is url for calling task in controller for Joomla 4?

This is my ajax query for calling a task in the controller (it works for Joomla 3 but doesn't work for Joomla 4): $.ajax({ type: "POST", url: "index.php?option=com_scrib&...
1
vote
1answer
63 views

Use com_ajax with a custom field

I've created a custom form field for templates, which is meant to handle SCSS compile. In short, I've opened an issue on Github where I had a little chat with one of the Joomla devs about wasm compile....
0
votes
1answer
64 views

Does an AJAX request to a PHP script inherit session context

From JavaScript loaded via a static HTML5 file [loaded from a Joomla page element's onClick event and window.open()], does an AJAX request to a PHP script inherit the session context such that ...
1
vote
1answer
70 views

Techjoomla API using same ACL as site

First Context: I am making a JS application that needs to call an api. The application is a form full of multiple choice select elements. Depending on the selected elements data is sent to the api. ...
1
vote
1answer
224 views

Ajax post request with pure javascript, no jquery

I'm using fabrik to develop some applications, it's great. However I have the need to use ajax with it now, I know how to use it and I already have everything set up, but I need to fix the javascript ...
1
vote
0answers
30 views

Using Ajax in Joomla articles to immediately work with input values in PHP

I'm trying to create a simple calendar utilizing my knowledge in PHP and MySQL, but I want to have it as instant as possible. I'm using an article and the plugin sourcerer. At first I created a simple ...
1
vote
1answer
245 views

TinyMCE editor loaded through AJAX not working

I've built a form that calls for an editor to be loaded through AJAX, but when I insert the fetched contents I get only a <textarea>. If I hit the toggle editor button, then the editor gets ...
0
votes
2answers
80 views

Leaflet markers in joomla are not removed

I am working on a project and I want to remove the markers from a leaflet map that were added to the map previously. The problem is that when I want to remove the markers that were added to the map, ...
0
votes
1answer
32 views

Own Module - Integrate ACL Check (in Ajax Call)

I'm currently programming a module that contains several Ajax calls, some of them with Add / update & Delete requests in the DB. Now I am thinking about the fact that it will be necessary to check ...
1
vote
1answer
74 views

How to get user object in Ajax call

I want to access the currently logged in user in my Helper function using AJAX. function editUser(){ runAjax('editUser',"one"); } function runAjax(type,regHtml){ request = { '...
2
votes
0answers
42 views

How to get an AJAX call in component's administrator side

I added a component to my site and it accesses my DB via an AJAX call. In my 'tmpl' folder, I have a 'default.php' file which makes an AJAX call that is received by view.json.php just outside that ...
1
vote
1answer
196 views

Getting module parameters in AJAX call using module id

I have set up an AJAX call in my module which works fine. I want to get the module parameters when I make the ajax call. So I'm doing this $app = JFactory::getApplication(); $module = JModuleHelper::...
0
votes
1answer
163 views

not able to do ajax request in my custom component i'm not working in mvc right now

if i go with upload my php file where data is being sent and from where data is getting stored (that php file) stored into server http://ip/includes/js_new/update_contact.php then it shows 500 ...
2
votes
1answer
668 views

Update List field rendering after ajax update

for one of my extensions i need to update a select list by ajax. the whole ajax call is working and i got the new option vars for the select list. I add those options in the ajax's "success" function ...
1
vote
1answer
57 views

Controller Joomla - Output Class construct for color css style

I'm trying to understand php class into Joomla and construct output. I've created this class into my controller.php: class ColorStyle { public $OpenJs = "<script>"; public $...
2
votes
2answers
89 views

Js/Ajax function into a Js file doesn't work

I'm not a programmer (This is my hobby, but I like to learn new things). :) I'm developing a JComponent on my side, and I need to integrate an Ajax Call in order to check something. But I have this ...
0
votes
2answers
239 views

Ajax Request returning the whole page not a specifc value

I am trying to make an AJAX Request to my function in my controller and it works, however, it returns me the whole page which i don't want. I have tried encoding it with json but no success i also ...
0
votes
0answers
51 views

Submit an XML form via AJAX using Joomla.submitbutton/form

I know there are a few questions regarding how to submit forms with AJAX but i could not figure out how to do it in my case. Should it be something like this? $("#adminForm" ).submit(function( ...
1
vote
1answer
77 views

Connecting module with com_ajax triggers request on menu item one level up

I've got a custom module which makes use of com_ajax to return values without refreshing the page. In my helper file I'm struggling to get the module parameters within the AJAX request and it looks ...
1
vote
1answer
31 views

Building a new module that loads articles not adding slashes in front of images

i am currently building a new module that loads joomla articles via ajax. During the final tests I noticed that image links are (relative links) not handled correctly. If an image is added to an ...
0
votes
1answer
99 views

Ajax Call: Problem with filter in Article & Articles Model in Module Context

I currently have a problem with an ajax call in my new module. the filters are not used. Here is an extract of the relevant lines: $articleid = $data_decoded->articleid; // Get an instance of ...
0
votes
1answer
37 views

Module creation reusing functions

I have a module that uses comAjax . Default uses the standard way of calling: 'option' : 'com_ajax', 'module' : 'available_stock', This works fine and in the module calls the relevant ajax function ...
0
votes
0answers
46 views

Joomla 3. Dependent select in custom component

I make a component for Joomla 3. It has two lists "City" and "Place". How can I make the "Place" list update without reloading the page when I select "City"? <field name="cityid" type="sql" class="...
1
vote
2answers
317 views

Call com_ajax from module backend

To create thumbnails & cache files, I have to access my already created Ajax Functions inside my helper.php file. I'm already able to call the functions within the frontend (button that is ...
0
votes
1answer
144 views

How to get data from core components and modules formatted as JSON?

As I would like to use a front-end JavaScript framework within Joomla I would like to know what's an efficient and maintainable, structured way of accessing data from core components (such as ...
3
votes
3answers
817 views

How to execute an ajax script to update form fields in an .xml file rendered by Akeeba FOF?

I would like to populate the "Owner" select option list by SELECTing the owner column from the #__gscrm_accounts table WHERE the gscrm_account_id (primary key) is the selected "Person or Business" ...
0
votes
1answer
115 views

How to post checkout data to component using Ajax?

$.ajax({ url: Joomla.getOptions('system.paths').base+'/index.php?option=mypage&view=cartcheckout&task=cartcheckout_autoSave&tmpl=component&stepId='+stepId, type: 'POST', //...
4
votes
1answer
3k views

AJAX post request not sending data

I am working on a Joomla 3.8 website on my localhost, hosted by MAMP 5.1. I am modifying the component J2Store, which is built on F0F. Please bear with me because I'm still learning a lot of these ...
2
votes
2answers
10k views

Simple AJAX call to a component giving 403 (Forbidden) error

Disclaimer: I'm pretty new to Joomla and web-development, so I probably am making a dumb beginner mistake. So far I've worked through much of the MVC tutorial in the Joomla documentation, and I've ...
3
votes
3answers
1k views

How to check JSESSION in javascript

I am developing a component and I use ajax calls to do some tasks in the frontend. I have come to a problem when the session is expires and I don't want to use keepalive to solve it. In the frontend ...
0
votes
2answers
2k views

Uncaught TypeError: Cannot read property 'HTML' of undefined

I'm pulling a module from our Joomla site to host onto our local servers and put back into Joomla as an iframe. I've gotten the source code, set up the database to mirror that of the Joomla. When I ...
3
votes
2answers
964 views

how to refresh Joomla token in form by AJAX

I've got a website that uses an AJAX call to login a user. To secure this, I've added a token to the login form - https://docs.joomla.org/How_to_add_CSRF_anti-spoofing_to_forms the problem is that, ...
2
votes
2answers
303 views

Run function in com_content with ajax - doesn't call it correctly

I've been following this tutorial to make an AJAX login form: http://www.mysite4u.net/joomla-articles/jquery-ajax-joomla-login.html But I can't get it to work. The ajax call doesn't work. It gives ...
1
vote
2answers
827 views

How to build valid json object for a component's ajax response?

I've set up an Ajax call in my component. I seem to have got the initial call, the controller, the data model is working because when I make the JavaScript call I'm showing this in the code inspector ...
2
votes
1answer
539 views

Reload admin form after save field in database

In a custom component I need the user in the edit view of an item to be able to load a field in the editor field through modal and ajax. The case is the user can fill an editor field from a text ...
1
vote
0answers
352 views

jQuery is not a function in ajax function

I'm modifying the website (I got it the way it is right now, maybe even worse). I'm getting the "Uncaught TypeError: jQuery(...) is not a function" on the website, the error appears in ajax function, ...
1
vote
0answers
387 views

joomla make a ajax request for another php file

Excuse me for my English. I'm a newbie in joomla. I make a phone book component and i wanna add a Ajax pagination. I've got Jquery function load_data where i put a url to my php page. And this is ...
1
vote
1answer
471 views

JFactory::getApplication()->input->post->get() prunes empty sub arrays/objects

I am sending a POST ajax call like this: var request = { option : 'com_ajax', module : 'mod_test', // to target: mod_test method : 'Test', // to target: function TestAjax in ...
5
votes
2answers
2k views

How to get Ajax response within a Module?

I am coding my first experimental administrator/module so that I can understand how Joomla performs ajax calls. I only need to refresh the content of my module with some server info and a couple of ...
2
votes
1answer
208 views

Accessing ajax/REST based php api

Someone built a site using joomla and third party plugin RS Forms Pro and created a page where a client could configure and purchase a product (via stripe). But they have asked me to write some ...
0
votes
1answer
275 views

Get ajax post data from another module in plugin

is it possible to catch ajax post data from another module in my plugin? I'm using SimpleForm2 https://allforjoomla.ru/extensions/mod-simpleform2 So this module creates a form and pass post data via ...