2022 Developer Survey is open! Take survey.

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
0 votes
1 answer
70 views

How to return data from 2 tables to one table using a select field

My tables: dzialki +--------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+-------------+------+---...
user avatar
1 vote
0 answers
16 views

Retrieving state variables using Ajax in 3.10.4

I have a site which displays a directory of registered users on the frontend. I've allowed users to select topics of interests when they're registering. In the directory they then can search by names ...
user avatar
  • 173
2 votes
1 answer
51 views

Invalid controller class from custom component ajax call to json method

I have an existing J3 component admin view which fires off a Javascript Ajax call to a Json controller and fetches back data which I then incorporate into that view. I'm trying to replicate how I've ...
user avatar
2 votes
2 answers
147 views

Integrate external news content API into com_content articles

My client is looking to integrate news content coming from an external API into their Joomla website. The API is in the JSON format and includes multiple fields like title, summary, date, and full ...
user avatar
1 vote
1 answer
237 views

How to output just raw json from my Joomla controller for Ajax requests?

I want to create a Joomla json response for an Ajax request. So, I followed the instructions here: JSON Responses with JResponseJson I implement the following code in my controller: use \Joomla\CMS\...
user avatar
  • 197
4 votes
2 answers
346 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 ...
user avatar
  • 2,388
1 vote
1 answer
36 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 ...
user avatar
  • 125
1 vote
0 answers
50 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 ...
user avatar
0 votes
1 answer
67 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=...
user avatar
1 vote
1 answer
37 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" ...
user avatar
  • 101
1 vote
2 answers
70 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 ...
user avatar
  • 111
0 votes
1 answer
148 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 ...
user avatar
2 votes
3 answers
88 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 ...
user avatar
  • 167
1 vote
1 answer
142 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&...
user avatar
  • 11
1 vote
1 answer
69 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....
user avatar
  • 395
0 votes
1 answer
74 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 ...
user avatar
1 vote
1 answer
75 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. ...
user avatar
  • 229
1 vote
1 answer
263 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 ...
user avatar
  • 21
1 vote
0 answers
32 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 ...
user avatar
  • 21
1 vote
1 answer
379 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 ...
user avatar
  • 268
0 votes
2 answers
84 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, ...
user avatar
0 votes
1 answer
41 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 ...
user avatar
  • 483
1 vote
1 answer
116 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 = { '...
user avatar
2 votes
0 answers
80 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 ...
user avatar
1 vote
1 answer
312 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::...
user avatar
0 votes
1 answer
192 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 ...
user avatar
2 votes
1 answer
792 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 ...
user avatar
  • 483
1 vote
1 answer
58 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 $...
user avatar
2 votes
2 answers
168 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 ...
user avatar
0 votes
2 answers
312 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 ...
user avatar
0 votes
0 answers
83 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( ...
user avatar
1 vote
1 answer
107 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 ...
user avatar
1 vote
1 answer
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 ...
user avatar
  • 483
0 votes
1 answer
111 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 ...
user avatar
  • 483
0 votes
1 answer
42 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 ...
user avatar
0 votes
0 answers
61 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="...
user avatar
1 vote
2 answers
347 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 ...
user avatar
  • 483
0 votes
1 answer
156 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 ...
user avatar
  • 243
3 votes
3 answers
902 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" ...
user avatar
  • 4,388
0 votes
1 answer
123 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', //...
user avatar
4 votes
1 answer
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 ...
user avatar
  • 299
2 votes
2 answers
11k 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 ...
user avatar
  • 299
3 votes
3 answers
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 ...
user avatar
  • 408
0 votes
2 answers
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 ...
user avatar
3 votes
2 answers
1k 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, ...
user avatar
2 votes
2 answers
332 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 ...
user avatar
1 vote
2 answers
926 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 ...
user avatar
2 votes
1 answer
547 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 ...
user avatar
  • 408
1 vote
0 answers
363 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, ...
user avatar
  • 11
1 vote
0 answers
398 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 ...
user avatar
  • 13