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
40
votes
6answers
32k views

What is the proper way to make an AJAX call in component?

I am developing a custom component for Joomla! 3.x and want to make an AJAX call inside it to retrieve some data. What is the proper way to do it?
11
votes
2answers
2k views

Return JSON using the Joomla Framework

I have started building a web application using the Joomla Framework. It consists of a simple web page which will be displayed in an iFrame along with an API that will be used to update the content ...
10
votes
2answers
2k views

How to render System Message from AJAX call

I would like to display a system message when I got back my ajax request. The ajax request returns the right message. I can test it with an alert. alert(result.message); Joomla.renderMessages(result....
9
votes
1answer
446 views

Trash Joomla Article in frontend

I'm developing a small plugin for Joomla 3.x that adds a "Trash article" button when you're in Joomlas Frontend. See screenshot below. http://imgur.com/NYLGRdY Now I have this AJAX call that ...
7
votes
2answers
3k views

What is the recommended way to structure a Joomla 3 custom component view using angularJS?

There is very little information out there from users who have successfully integrated angular js in a joomla custom component list view. I found the following: https://stackoverflow.com/questions/...
7
votes
1answer
1k views

How can I use com_ajax to load and unload another module (for Adaptive Design)

This is a followup of the question How can a module be disabled based on device or viewport size in Joomla 3 to optimize performance for mobile devices? How can I use com_ajax to load and unload a ...
6
votes
1answer
2k views

Joomla token with ajax request

I've built a module that requests some data from the server via an ajax request. It includes the Joomla token to validate the session. An odd thing is happening-- when I open Chrome and load the page,...
5
votes
3answers
132 views

Stop robots from getting site/article content

This is not a question about indexers, most of them obey robots.txt file. But maybe you noticed publicized cases where Facebook or Skype followed URL's posted by users or which were sent via private ...
5
votes
2answers
1k 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 ...
5
votes
1answer
3k views

Best way to call helper class function through ajax in module

I need to access helper class function through ajax request. In JS file :- var sbfootscores = {}; (function($){ sbfootscores.getTeams = function(competition_id){ $.ajax({ ...
5
votes
2answers
984 views

Rapid Ajax calls causing some MySQL queries to be ignored

I am currently working on a Joomla website on a Unix server. There are no users connected at the moment because I'm the only one who can access it (so no heavy traffic). During testing, I proceed to ...
5
votes
2answers
2k views

What is best way to implement ajax infinite scroll to a custom component list view?

What is the recommended way of overriding standard jPagination class to achieve ajax infinite scroll on a joomla! 3 custom component list view? Ideally I would like to push the browser state and ...
4
votes
1answer
2k views

Writing custom method to save form data

I am trying to find the preferred way to save form data using joomla API methods. I am trying to save data with an ajax-call. First i tried just calling the components standard save method, calling: ...
4
votes
1answer
1k 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 ...
4
votes
1answer
938 views

Joomla Ajax Module getAjax() method not found

I have no experience with Ajax and little to no experience with Joomla. I've managed to create my own Joomla modules with no problem. Today I tried to use Ajax in one of my modules but I am getting an ...
3
votes
4answers
779 views

Override default php session

I'm building a AngularJs app using joomla in background. The AngularJs app get loaded once and then calls the server always through ajax. Some calls happen simultaneously. If I'm using the default PHP ...
3
votes
3answers
574 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" ...
3
votes
2answers
697 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, ...
3
votes
3answers
692 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 ...
3
votes
4answers
640 views

Ajax error when attempting component updates

I am having a couple of issues with a Joomla 3.6 site that I maintain. Issue 1 is with the Joomla update component. When the update attempts to run it gets an Ajax alert error, and the following ...
3
votes
2answers
734 views

Ajax call to component from menu item

I use K2. I have a menu item that leads to a page showing introtext and small images of the 4 latest articles from a category. This is set in the category parameters and the menu item leads to the ...
3
votes
1answer
2k views

Submitting a Form with file inputs via AJAX

I am finding a way to submit the form which contains a file input along with some other text inputs. view This is a simple view with a text box, file box and hidden boxes <form method="post" name=...
3
votes
2answers
572 views

Joomla AJAX request

I'm developing a Joomla component where I have a treeview in the sidebar with the content of a database table. When clicking a node of this sidebar I want to show the children nodes in the main part ...
3
votes
3answers
1k views

Insert into database with ajax from a joomla 3 module

I have seen a lot of inquiries about ajax, but normally there are about retrieving data from database. I was wondering about how to insert data directly interacting inside a module. I have a module ...
3
votes
3answers
314 views

How to keep data in Joomla module helper class

I've created a module that connects to the database and retrieves some data using $data = $db->loadRowList(); inside one of the member functions of the module helper class. Is there a way I can ...
3
votes
3answers
4k views

Using AJAX in a custom module - how to do it?

I think this might be useful in future for many others. First of all, I know that there's com_ajax for this kind of a job, but I do not want to use it. Is there an alternative? What I got: default....
3
votes
2answers
1k views

AJAX post not able to update database

How can I achieve a database insert using AJAX? I've created a module and I'm using AJAX post to insert a record into the database but seem to get a silent error and no database update; I know the ...
3
votes
1answer
2k views

Post data using com_ajax joomla 3

My Jquery code is jQuery(".loginbtn").click(function(e) { var value = JSON.stringify(jQuery(jQuery('#form-login input[class!="noAjax"]'), jQuery('#form-login')).serialize()); ...
3
votes
2answers
2k views

Joomla backend form with ajax autocomplete

I'm completely lost at creating a autocomplete function for a form field. Even thought the thing I want is pretty simple: I created a form for the backend. Now I have a text field which I basically ...
3
votes
2answers
976 views

Using com_ajax in a custom plugin to retrieve k2 items from database

I am using rsform pro to show dropdown option values from joomla database. I have 2 dropdown boxes, A list all the category name and its id while B lists all the available k2 items. I have a jquery ...
3
votes
2answers
2k views

Can't access jmodulehelper load method in module helper file

I am using com_ajax in joomla 2.5 - https://github.com/Joomla-Ajax-Interface/component As I have many instances(duplicate modules) of same module from where I call to com_ajax component by jQuery ...
3
votes
1answer
2k views

Load K2 article with ajax

I am using the category layout to feature articles on my front page with joomla 3.3. I am customizing this view so that the article links pull the articles into this page via ajax on click. This is ...
3
votes
2answers
2k views

Error: 404 Category not found error with custom PHP script

For some time now I have been working with Joomla, and now I am working with a version 3.1.5. I often make my own PHP scripts to use for AJAX callbacks and other things. I put them in a folder ...
3
votes
1answer
636 views

Chosen on AJAX content

I am working on a site (custom component and template) where I want some links to have their content shown in a popup. The popup itself seems to work fine, but I noticed the select boxes aren't ...
3
votes
1answer
485 views

Get date value with jinput

In my form I have selecting date with datetimepicker which i'm using only date picker. I need to get the selected date value to do some calculation in php through ajax. Here is my code but the ...
3
votes
1answer
2k views

Get/set userstate and session variables not working inside for loop

I have a long loading for loop inside a function in one of my model in my Joomla component. In order to gauge the progress, I wanted to make a progress bar using ajax and javascript as the request is ...
2
votes
3answers
3k views

How to pass variables via $.ajax to a controller

I found some portions of codes but I don't know how to complete it. I need to pass some variables via ajax to controller in order to store them in Joomla session. So I have the code: <input type="...
2
votes
2answers
516 views

Making an ajax-based template?

Is there any proper way to make an AJAX engine for a theme in the Joomla? I want all of my navigation happen without the page refresh, or in other words, thorough AJAX calls. Should I rely on ...
2
votes
2answers
237 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 ...
2
votes
2answers
32 views

Searching for users and tagging their name in a post

I've developed a Shoutbox extension and would like to implement a feature, by which you can tag a user in a shout (same concept as tagging a user on JSE) using the @ symbol and then the user's name. ...
2
votes
4answers
2k views

How to retrieve data from the Joomla DB via jQuery.ajax without controller

I need to retrieve some data from #__virtuemart_order_histories in templates/active_tmpl/html/com_virtuemart/orders/details_history.php via jQuery.ajax. I know that I can do it with a new &task= ...
2
votes
2answers
6k 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 ...
2
votes
1answer
390 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 ...
2
votes
1answer
5k views

What is the correct url for calling task in the backend controller

I'm developing my custom component and I need to call some task from back-end controller during editing a single record. The url of my record edit page in the back-end is: .../administrator/index.php?...
2
votes
1answer
1k views

How to load Joomla session from external AJAX call

I have a Joomla 3 site, and under that site but not within the Joomla framework, I'm doing all of my coding. Most of the functionality I'm providing with jQuery AJAX calls. In the PHP scripts used, I'...
2
votes
1answer
47 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 ...
2
votes
1answer
358 views

Custom Module delete from database with AJAX

I have been trying to get my head around Joomla's com_ajax component for some time with a view to using it in my custom module. The module displays data from a component. One of the form fields is of ...
2
votes
3answers
3k views

Sending POST data within module - AJAX

Requirements for this task is - I can NOT use any type of components (com_ajax is out of the options list) GOAL: send post data if checkboxes are 'checked' using ajax within custom module. Is my ...
2
votes
3answers
2k views

Ajax call returns html baggage

I have read similar questions on this site, but none that I can find matches my problem closely. I manage a joomla 3.5.1 site and I wrote a javascript that, when I press a button, sends a mail by ...
2
votes
1answer
2k views

Loading the options of a select form field via jQuery Ajax

Basically I am trying to load a front-end form select field via jQuery AJAX. The XML form field is <field name="student_ids" type="list" required="true" label="Select Students" multiple="...