Most voted "ajax" questions
AJAX (Asynchronous Javascript and XML) is a technique for creating interactive websites uniformly through asynchronous data exchange between client and server. AJAX facilitates server communication or partial page updates without a traditional page update.
Learn more…3,397 questions
Sort by count of
-
0
votes1
answer35
viewsHow to pass what runs in JS to input field on the same page?
I need some help that I’m stuck in here, and I don’t understand AJAX. I have these fields, select(tour), QTE(Adults) QTE(Child) TOTAL ( where performs the calculation). I need that when calculating,…
-
0
votes1
answer131
viewsGlobal variable is not being assigned within an AJAX function
I created a global variable in Javascript and I am making an AJAX request, inside the function Success ajax, I assign the return to the global variable, but when leaving AJAX, the variable is…
-
0
votes1
answer239
viewsXmlhttprequest - Depreciated Async False
My console is informing me of this: jquery.js:9592 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because However, I need async false and I’m not sure how to do it.…
-
0
votes1
answer116
viewsHow to highlight a table element from the JS
I am making a simple bingo using html, css, ajax and JS. Table elements are brought from a request, within an array and placed in the table(...). Using the onclick function, picked a random number…
-
0
votes0
answers48
viewsAjax - Commando Load does not work
I wonder why the load command is not loading the header.htmlfile. PS.: Both are in the same folder. File: main.html <!DOCTYPE html> <html lang="en"> <head> <meta…
-
0
votes2
answers54
viewsRunning ajax within a table
Good afternoon everyone, I’m trying to make a code where it shows how long a request has been opened and I have an ajax that keeps updating this counter every second, my problem is that this request…
-
0
votes3
answers588
viewsRecover $_SESSION with Ajax
It is correct/safe to set a Session in PHP and recover this value using AJAX? I am creating an application using transparent Pagseguro checkout and need to pass a value as Reference (Identifier).…
-
0
votes2
answers77
viewsSend data via the form without refresh
Good evening, I have a comment script, and I wanted when the user sent the comment, it remained on the same page as it is, without upgrading to the php page. At the moment when it sends the question…
-
0
votes1
answer356
viewsHow to load a value into a DIV after selecting an option in the dropdownlist of an input text that uses Typeahead and Ajax?
Hello! I am developing a project where I am using the plugin Bootstrap Twitter-Typeahead where I load values inside an input text. The page I am developing has 2 fields: 1. An input text field whose…
-
0
votes1
answer46
viewsHow to throw controller errors and capture them in an Ajax - Asp.net Core MVC request
I’m using AJAX to make a request and the return is a Partialviewresult. In the request, I am passing the personal model. Someone knows how to help me? CONTROLLER: [HttpPost]…
-
0
votes1
answer95
viewsLoad related values in input text field correctly using Typeahead.js
I’m using the plugin Typeahead.js in my project and would like to modify my script so that it can fill the input text field correctly after a select box option is selected. As a reference I created…
-
0
votes1
answer68
viewsAlert keeps popping up no matter what I do!
I took the code of a shopping cart on the internet. And there is the cart page where the customer can increase or decrease the quantity of the product. The problem with this code is that each time…
-
0
votes1
answer142
viewsShow success alert with sweetalert2
When saving the form to the database I want to show a success message to the user. I am trying to use sweetalert2, but it’s not working. I already have the libraries: <link rel="stylesheet"…
-
0
votes1
answer515
viewsfunction js calling twice
I am having a problem creating a function in java script that needs to be executed in a file but this calling several times the same function when I try to put the function in input does not work…
-
0
votes1
answer564
views -
0
votes1
answer97
viewsHow to specify in javascript the set of inputs that have been cloned
I am set up a request system that takes information from the database and fills the fields with it. Follow the request code that fills the fields with the information: $(document).ready(function(){…
-
0
votes0
answers83
viewsUsing new Class() or instead of new Namespace Class() in PHP autoload
I’m facing a problem to handle my classes with the composer autoload. All calls are made through Jquery, then it calls a PHP document that should assemble the class page and call the function I…
-
0
votes2
answers54
viewsInsert from a table with for
I have the following html: <?php $j=0; while($rows_cursos1 = mysqli_fetch_array($resultado_cursos1)) { ?> <tr> <td style="display: none"><input type="text" name="NomeUtente[]"…
-
0
votes1
answer41
viewsRequest ajax forwards call to controller
Talk to me, people. I have a problem with item registration, when you list a series of items and I click add opens a new modal with the characteristics of the item that will be added. However when I…
-
0
votes1
answer44
viewsI cannot show database data with ajax,php and jquery
I need you to click on checkbox, he makes a database query and returns it to me inside a div. But I can pull the data with ajax and show in div directly(home_.php is showing the select I did), but…
-
0
votes1
answer226
viewsHow to make a single request with ajax and jquery?
I have more than 50 checkbox,when I click on it, it checked the state with jquery step pro ajax bring the data from the page "home.php", but the way it is like this, I have to duplicate the code and…
-
0
votes1
answer107
viewsSet icon and display file name depending on file extension
Ultimamento I’ve been fiddling with uploads of files, view them with PHP and etc... and came to me a question the head, I searched but I did not find something right. How close I can get to making a…
-
0
votes0
answers136
viewsPUT AJAX api Climatempo returning CORS error
Hello, I’m having problems performing a PUT in AJAX with the weather api, my code is this : var URL = 'http://apiadvisor.climatempo.com.br/api-manager/user-token/TOKEN/locales'; $.ajax({ url: URL,…
-
0
votes5
answers195
viewsSending view string to controller via Ajax. Codeigniter, javascript and php
I’m trying to send information that is in the javascript code block to my controller, but I’m not sure how to capture the information in my controller. Follow view Javascript code: <script…
-
0
votes1
answer86
viewsHow to validate the field by passing a value through the change method
I’m new to javascript, I would like help with a problem. I managed to make sure that when selecting the value of the first select of "UNIT" the bottom select came with the same value, but as you can…
-
0
votes0
answers102
viewsRegister Data in Mysql using Ajax and PHP
I am trying to register a date field for a service registration system and the queries are not being sent to the database. I tried using only PHP and it worked, but when I use the same code with…
-
0
votes1
answer27
viewsHow to send variables via upload form
I’m trying to send some variables that are in an upload form, the variables are not being sent, I already did a search here in the OS and there are some questions, but nothing that could help me.…
-
0
votes1
answer69
viewsAjax Javascript Post Authentication Failed
I have an LP that submits a form. I’m taking a test to call a POST when I click Botao to submit a JSON to my API. The JSON is converted. But when you call the $.ajax post it gives…
-
0
votes1
answer49
viewsReply of the full query of line breaks
Hi, I have a problem with the query answer I made to db is full of \n and \ . Does anyone know what the problem might be? Thank you. model function, query a db in search of products added to cart by…
-
0
votes0
answers55
viewsRun script on remote server when new entry is in Mysql
For security reasons, I have two servers. In one is hosted the site with the entire user interface and DB Mysql, and in another is hosted the application that will run the script from the user…
-
0
votes0
answers53
viewsJSON returning two different PHP errors
I’m using PHP with Codeigniter, and is giving this error in an ajax I’m using, I can’t figure out what it is, I get these two messages: syntaxerror: Unexpected token < in JSON at position 1, And…
-
0
votes1
answer135
viewsAutocomplete taking data from a json of a url
I have this jquery <script> $(document).ready(function($){ $('[id="franchise"]').autocomplete({ source: "/ajax_calls/search/", minLength: 3, open: function(){ setTimeout(function () {…
-
0
votes1
answer425
viewsHow to send data array to Asp.net core controller
I have a screen where I have the registration of some items, in my control I am receiving the data of the array, but it is coming empty. I already tried some options here on the forum, such as…
-
0
votes1
answer66
viewsSend Ajax POST to another port?
I am making a website with pure PHP/JS, but I need to use the services of Google Calendar API and wanted to use them with Node. My Node server is running on port 3333 and PHP on 80. I tried to use…
-
0
votes1
answer41
viewsError in listing filter with php and jquery
I was trying to make a list filter, I would like every time that the select changes its value to update my table, but there’s an error that I can’t find, when starting the page or changing the…
-
0
votes2
answers85
viewsExchange on click for checkox checked
Hello, I have a function that works perfectly in javascript use an ajax when clicking the button to send my data, only now instead of clicking the button, I want to change for when the person marks…
-
0
votes1
answer456
viewsUncaught Referenceerror: method is not defined
I’m calling a method to convert my ajax request to a readable date, but I keep getting the message that the function has not been set, I don’t understand why, since it is literally the function just…
-
0
votes1
answer272
viewsReturn fetch js result on a global variable
Hi, sorry about the layman’s question. Basically I want to use the fetch return and put in a variable, I can use it in other functions to make 1 request only, today I’m using const xhr =…
-
0
votes1
answer197
viewsCalling PHP function via a button in a modal
I’m displaying the amount of files in a directory, within a modal, I want to call a function in PHP when the user clicks the button "Erase", tried to use onclick , but it didn’t work. My code:…
-
0
votes1
answer83
viewsSelect based on a combobox
I have a system with interactive map for registering companies. By clicking on a state it opens a <select> with the segments of companies of that state, but when selecting a segment it shows…
-
0
votes0
answers57
viewsTransforming Code into Ajax Jquery for Pure Javascript
Hello, everybody all right? I’m creating a pagination system. However, the pagination system is the only system of the site that is using Jquery. That is, it is loading an entire library, affecting…
-
0
votes1
answer90
viewsHow to use . click on jQuery after return from ajax
I have an ajax function that returns content with a button. I would like to call another function triggered by the button that the ajax returned, as in the example below: <button id="procurar"…
-
0
votes1
answer55
viewsHow do I make a multidimensional array return by ajax
good morning, I have the following code (this working), it returns me to Ajax an array with integers. <?php date_default_timezone_set('America/Sao_Paulo'); require_once '../conexao/conexao.php';…
-
0
votes2
answers68
viewsSending email in HTML format via an Ajax JS request to an API that uses Curl in PHP
Good afternoon to all! I am structuring a contact form for a website and am using an API from sendgrid, available via rapidapi (https://rapidprod-sendgrid-v1.p.rapidapi.com/mail/send). With this, we…
-
0
votes1
answer13
viewsAjax updating another request
I have this ajax request that brings comments from a file (.php) TOGETHER WITH A FORM AT THE END to insert more comments: //carregar comentarios…
-
0
votes0
answers106
viewsProblems updating page and scrolling user after idle period
I need to deploy the user after an idle time. I can update and destroy the session but it’s not working as I need it. That in the case is that php does not identify as an activity performed by the…
-
0
votes1
answer27
viewsAJAX request not working
I have a function that calls an ajax to save in the bank. All my other POST requests I did this way and it worked. Now I don’t know what happened. If anyone can help me. $.ajax({ type: "GET",…
-
0
votes0
answers19
viewsUsing $Ajax to save filename to a scaffold
I’ve been working on it but I can’t solve my problem. I have a JS code that through an input I can access a txt file and get its name. I also created a History scaffold so I can store that name. if…
-
0
votes2
answers62
viewsIs it possible to call a PHP function through AJAX?
In my PHP page I have the functions: register(), edit() and remove(). How can I make it so that when ajax sends the data in "index.php" falls in the function "registration()"? AJAX:…
-
0
votes1
answer165
viewsjQuery Ajax File Upload error serialize
I am implementing an upload system in my system but am not able to recover the upload data via jquery serial when I pass the data without input file it works normal and does not present me error.…