How can I know that no one AJAX request is being executed right now?

How can I know that no one AJAX request is being executed right now or all AJAX requests are completed? I need to write an if statement. I need js native or jquery. Like: if(“`no ajax pending“`){ …

upload a file in headless mode for robot framework

I’m writing an automated test in the robot framework and I need help to upload a file in headless mode for the below HTML code using robot framework libraries or some code in python or javascript or …

data-id always returns the same value

I am calling an api using ajax which returns me a list of available coaches in a particular area. I am then displaying each coach and his details(firstname, picture, email etc) in a div using foreach …

Unknown problem with (probably) POST method

This task is quite simple but I just can’t seem to get it to work. What the outcome should be is explained in the picture below. I guess that there is some kind of a problem with POST in php, but I’m …

How to decode JSON when using PHP multi_curl

I’m trying to access data on the internet via an AJAX and using PHP. I’ve managed to access to data, however, it is JSON encoded. I want to decode the results. PHP File: $executionStartTime = …

Select2 is not selected when update a select field by ajax call

I am facing a problem when I use select2 class in select option. When I insert a form data using a field select2 class by ajax call then it is working properly But when I update that select2 field by …

Can php wait for a very long time before responding to an ajax request

I would like to make a chat site where the js AJAXs to PHP and the PHP waits for the database to change from what the user has then it responds to the user and the user again in the recall function …

Dynamically target specific DIVĀ“s with unique ID in Ajax

Say that I have more than 100 forms on one page (I know it is a lot, but neccesary in this matter) and I have a Ajax that submit each forms without reloading the page it is in, and Show/Hide a DIV on …

Best way to chain jquery ajax calls which pass information

I am making several asynchronous ajax calls which must be executed in a specific order and which must pass information to each other. Here is a MWE of my current approach. Even with three API calls it …

Dynamically inserting latitude/longitude from array to weather API call in PHP

I have a leaflet map which has markers displaying the top 10 cities in a country depending on what country is chosen from a select field. $latLng contains 10 latitude/longitude pairs and is being used …