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
-
1
votes1
answer600
viewsHow to display error message and redirect in jQuery
I’m trying to display the incorrect data message via Ajax but I’m not getting it, what am I doing wrong? And the header is not redirecting Ajax $(".form_log").submit(function(){ $.ajax({ url:…
-
1
votes1
answer218
viewsJquery Clear array when making new request
In the view I have a input select which event onchange I run a call on ajax for a given route that searches all items of a Model. <select required onchange="getQuestions()"…
-
1
votes0
answers51
viewsAjax feedback from PHP
Friends have a procedure in php where there is a "for" loop, every time it returns to the beginning it triggers information that is received in the Jquery/Ajax function that triggers it. The point…
-
1
votes0
answers123
viewsInput HTML and Django Request.POST array
I’m trying to do a POST with Formdata for a view and I’m not getting the input array. Follow the example: HTML <input name="bonus" type="number" placeholder="ex.: 100.000,00"> {% for x in…
-
1
votes1
answer50
viewsIs it possible to take a data from a JSON using a predefined variable?
I have a link with an attribute that has the information of which JSON data should be obtained. <a href="#" data-json-code="code_118"></a> And I have the code responsible for its…
-
1
votes1
answer199
viewsLogin Security with PHP and AJAX safely targeting
Recently I had to make a login system with access levels, but when directing the user to a given page hit me a question regarding the security of the code. Ignore the validations, I will show only…
-
1
votes1
answer100
viewsPerformance Ajax
Developing an application, and testing some calls ajax I have come across two different situations, but in both of which I have the feedback I need. What I want to know is, if there’s any other way,…
-
1
votes0
answers76
viewsshow image coming from postgresql database with ajax
I saved the image in the postgresql(oid) database with php. Now I intend to show this image on the screen through AJAX, but I’m not getting it. The line "$("#image") is maintained.…
-
1
votes1
answer90
viewsAuthenticate AJAX Request - PHP
Using as example the request below and using as parameter the id, I got the return as expected Ajax let id = 1; $.ajax({ type: 'GET', async: false, contentType: 'application/json', url :…
-
1
votes1
answer200
viewsUpload external content with AJAX to global Javascript variable
I’m uploading some data from an external file (.txt) local using AJAX, I would like to know how I can store this data in a global variable for data manipulation, because I need to separate some…
-
1
votes0
answers48
viewsevent $.post ajax alert status
I’m using $.ajax post on jQuery so: $('#btnSave').click(function () { let data = $('#addRunner :input').serializeArray(); $.post('addRunner.php', data, function (json) { if (json.statusF == 'fail')…
-
1
votes1
answer78
viewsAjax script is not hiding modal popup - $("#dataModal"). modal('Hide');
I have a form that is inserted in a Modal Bootstrap code. When the values are entered in the input fields, the Ajax script passes these values to a php file and returns with a successful Alert. What…
-
1
votes2
answers290
viewsDoubt in passing parameters via AJAX to ASP NET CORE Action
Friends, I’m having trouble passing a value to the action of a specific controller that takes as parameter an id of type int. AJAX var dataForm = $("#statisticId").val(); $.ajax({ contentType:…
-
1
votes1
answer38
viewsWhat’s the best way to submit a form?
Good morning, I need to send the form that is completed, on the page I have several forms and I just have to send what will be completed. I wonder if the best way is to make each id for each form…
-
1
votes0
answers47
viewsAjax rejecting images in byte array
I have a system made in Asp.Net, I use as a request source Ajax along with Jquery. I created a function that searches the images stored in the database, converts them to byte array (this via…
-
1
votes1
answer147
viewsPull content from within a table to text boxes within the modal
I have a table whose contents come from a server, in json. Each row of the table has a code number, a product name and an edit button, when clicking this edit button opens a modal where there are…
-
1
votes1
answer243
viewsProblems passing 3 parameters via AJAX request -Asp.net Core MVC
I need to pass 3 parameters to my controller, but the values are not enough: Personal Contact Personal Modelcontact Contact Information: Complex parameter (class with properties); int…
-
1
votes1
answer68
viewsPOST sent by ajax is empty in php
Hello, I am making a login system with ajax, which is activated with a button, however I am having problems, because the data sent by ajax, which are the username and password, They do not exist or…
-
1
votes1
answer81
viewsHow to upload more than one AJAX - PHP id?
In the case below I am sending the ID data: id_motor... And if I want to send another ID together, like the id_motor and the id_model, as I would? $(function(){ $('#id_motor').change(function(){ if(…
-
1
votes2
answers765
viewsDatatable Data Format Problem
Good morning I’m having trouble formatting values in Datatable: In the Limit, Open, Operated columns it returns values in the US pattern like: 38000.00 I want to leave in the Brazilian standard:…
-
1
votes1
answer3166
viewsConfigure CORS on a PHP page with Basic Athenticate
I posted the page php test. in the field: https://www.teste.com/api/teste.php <?php header("Access-Control-Allow-Origin: *"); header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1…
-
1
votes1
answer492
viewsProblem in Reload Table Using AJAX
Good morning, I am using Datatable and loading my data via Ajax from Datatable itself but I would like to give Reload updating the table with the new data from the database However, the table is…
-
1
votes1
answer343
viewsPopulating Select with another Select value in Modal
Good. I am in a part of my project where I created a form with 4 select options with Mysql Database values. being that they are populated with value of the previous select, working in the first…
-
1
votes1
answer111
viewsReturn value with PHP and AJAX
I’m trying to do a POST and it’s right in parts, only when I try to send the value of FORM to the destination of the post it gets the blank value. See my code: This is the form that sends the POST…
-
1
votes1
answer199
viewsHow to access data sent by PUT (ajax) in php?
I am creating an application in REST format in which my front-end requests a PUT (By ajax) to the back-end. No request I am sending the new information for update, but I am not able to access this…
-
1
votes0
answers72
viewsForm Autocomplete
I’m trying to make an autocomplete form, however so far it doesn’t work, I don’t know if anyone can identify the error <div class="form-group"> <label class="control-label col-sm-4"…
-
1
votes1
answer140
viewsError using filter_input in PHP
Hello, folks. I have one and I’m trying to process its data in the php file. (I’m using AJAX to upload to the PHP file). The query was normally performed before I put the filter_input. However,…
-
1
votes0
answers53
viewsPrevent redirecting to another page
Good Afternoon. The goal is that when the user clicks on a menu item, he loads the file containing a form into the "Other page". By the time this happens, the problem comes later. When I click on…
-
1
votes0
answers38
viewsLimitation of 6 Requests followed in ajax
Hello, I’m making an application where I make an ajax request to register in the bank, the request is working smoothly. However I noticed that only accepts up to 6 requests in a row without updating…
-
1
votes1
answer17
viewsajax is not sending input files
ajax is not sending values when adding "arquivo1": arquivo1, //file imagem "arquivo2": arquivo2, //file imagem "arquivo3": arquivo3 //file imagem however if I remove the above code it sends the…
-
1
votes2
answers249
viewsHow to view JSON data in jQuery Datatables via Ajax?
My table is not being loaded with the data that is in my JSON file, as I have little experience do not know what is wrong. My JSON file is in the same directory as the web page in question, this is…
-
1
votes1
answer104
viewsAjax request responding with status 500
I am using Spring, I test the return in the service and controller methods and are correctly returning what I want, and is entered in the database, but even so gives the error: My request:…
-
1
votes0
answers160
viewsReturn list with Ajax post method
Good afternoon to all, I have a problem which is as follows. Through an Ajax request I return a list of objects. This class of mine is just to load the data I need to send to the view that makes the…
-
1
votes0
answers111
viewsAjax PUT returning error 500
I did an ajax to use the PUT method to update the field of a table but the server (Rest) is returning me error 500 and I do not know what I’m doing wrong, someone can give me a light please? Error…
-
1
votes1
answer38
viewsForm insert with checkbox
I have this form, where I have a checkbox: <div class="table-responsive"> <?php $user = (!empty($_GET['codigo'])) ? $_GET['codigo'] : ''; ?> <input type="hidden" id="codigo"…
-
1
votes2
answers391
viewsvisible or invisible input when selecting checkbox
The Form has a checkbox that when selecting shows an input that is hidden. It is working correctly, when I enter the page the input is hidden and is only visible when I select the checkbox, as I…
-
1
votes2
answers274
viewsHelp Curl+ Sleep
There is the possibility to make a script I have in CURL wait 50 seconds to run? I tried to stop him over Sleep for the whole run, I need to pause only the Curl in question function writeMessage() {…
-
1
votes1
answer593
viewsUpdate field with select data
I have a field of type select that I select a driver, I would like when I select this driver the text field received the phone of this driver, which already comes with the information of the line of…
-
1
votes2
answers137
viewsHow to treat Timestamp field return via AJAX?
How to convert this sequence of numbers: 1555506548000 into a valid date ? I need to make the following comparison: if (_valor[0] == item.DT_CRIADO_EM) { //Faz alguma coisa }; However the date is…
-
1
votes2
answers352
viewsTaking an element inside an object
Hello, how do I get the "name" element, being that it is within "show" and the whole "show" is within "0"? (NOTE: If the nomenclature is wrong, I’m sorry, I’m beginner in JS) 0: score: 31.86105…
-
1
votes1
answer912
viewsHow to send data from a form with attached file to an email with PHP and AJAX?
I’m trying to send a file using the function mail() of php, problem that I am doing the tests and the email is sent but will not the file and the email is sent totally uncompromised, which may be?…
-
1
votes1
answer17
viewsjQuery does not find td generated by Ajax
I have a dynamic table fed via Ajax that returns the following code through a foreach: <tr> <td hidden value='{$conteudo['contId']}' id='contId'> {$conteudo['contId']} </td>…
-
1
votes1
answer120
viewsSend Ajax data to controller and return values
My project is a Struts application, and my problem is that I’m not getting the return of the back-end method for the ajax method in the graphical interface, and I’m needing the modal form to return…
-
1
votes0
answers35
viewsSweetalert does not cancel deletion
I created a deletion system with sweetalert, when clicking delete, it does not cancel the deletion. The language used is PHP without OO and PDO. Could you help me? Follow the code of the Alert and…
-
1
votes2
answers710
viewsError handling a JSON return in AJAX
It has been 3 days that I am searching in several sites of the network that deal with this subject a solution to my problem, but I am not able to discover the cause of it. I come to ask for help…
-
1
votes1
answer383
viewsUsing the Mail API with AJAX
I’m practicing ajax using the post office API. I did it! But these 2 situations happen: 1- Gets stuck in the Else block, so if I put an invalid zip code after listing a valid one shows nothing, nor…
-
1
votes0
answers78
viewsUsing Phpmailer and Ajax with Slim Framework
I’m a beginner in PHP and I need to treat a post route using Ajax, Slim and Phpmailer. In my index where you have the form I am using this jquery code for Ajax request: <script> $(function ()…
-
1
votes0
answers43
viewsRemove value from a POST variable to not duplicate insertion
I have a problem on my site, when I click save inside a modal, it sends the data via Ajax and makes the insertion in the database, when performing these steps, I call a javascript function to update…
-
1
votes1
answer127
viewsSubmit confirm() the Cancel button does not work
I am having a problem where by clicking the Cancel button is not canceling the operation and this continuing and sending the form <form action="insere_forn.php" class="control-form" method="post"…
-
1
votes0
answers77
viewsTwo Ajax requests
I need to make two Ajax requests. one for my own database. the other is via API. the first is to query in my database, if the CNPJ, informed is already registered, the second is for an external URL.…