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
-
2
votes0
answers185
viewsonChange function does not work when applied to multiple fields
Use the function onChange="getPeca(1);", where is accessed a JS that feeds the field to the side with the description. This works, if I directly in the field and enter the code and give tab it does…
-
2
votes1
answer1255
viewsForeach Ajax for combo
I have the following Ajax snippet to feed text or select input with already defined values: ids.forEach(function (id) { document.getElementById(id).value = dados[id]; }); I wonder if you have how to…
-
2
votes1
answer1517
viewsPassing variable to modal
I have a modal that opens at the end of an action (Example: Disable User). I am building the modal and wanted it to receive the text present in an ajax variable. Check code: $.ajax({ url:…
-
2
votes1
answer718
viewsConvert string in parameter to arrayToDataTable(varString)
Hello, I’m starting to use ajax and the Google API (Chart) to create charts. I use a Generic Handler I called 'Collaboratorsempresa.ashx', in it I make a query in the database and return a string…
-
2
votes0
answers572
viewsSend data by Ajax, query Mysql in background and plot Google Chart with found data
Below I present a step-by-step of what the code I will present already performs correctly. After that I will present the new approach that I would like to use, but which unfortunately is not…
-
2
votes1
answer773
viewsRedirect AJAX Cross-Domain Request in PHP
I have a code that redirects an AJAX request and it works normally on localhost, but on the hosting server cross-browser the request is not redirected. header('Location:…
-
2
votes1
answer60
viewsWhy is this script returning an object to me?
I am working with jQuery to register information in the database through Ajax and do not know why this code is returning me a variable of the object type. The project I’m working on is being…
-
2
votes1
answer175
viewsForm with datetimepicker
I am developing a scheduling system and I am using the datetimepicker to make the appointment. I need a help with json; I need to block the dates that are being used so that they cannot be selected.…
-
2
votes1
answer427
viewsJSON return in an array in the LOOP
I need to save the return of JSON in an array, i.e.: $.ajax({ type: "POST", dataType: "json", url: "/engine/listarPublicacoes.php", success: function(data) { for (var i=0;i<data.length;i++){ var…
-
2
votes1
answer1561
viewsUpload only with jQuery.ajax and PHP
I wonder if it is possible to upload a file using only $.ajax({...}) unfulfilled Submit of the form and if so, how? Note: I would like to put this script in the event onchange. Note 2: If possible I…
-
2
votes0
answers120
viewsWhat is AJAX for?
Someone could tell me, during his programming career, how he knew he would need to learn how to use AJAX, what was the purpose etc.? I’ve been trying to figure out AJAX from W3schools for hours, but…
-
2
votes1
answer2580
viewsHow to update "<form></form>" without Refresh?
My form is a shopping bag when. Submit() the form #add-Cart-head, it adds the product without refresh, but I wanted to have a reply that updates the bag that sits at the top of the page. The "GET"…
-
2
votes2
answers977
viewsHow to use JSON response?
After a lot of trying I arrived at this result of JQUERY AJAX, but I still could not use the JSON data, they do not work, how should I do ? give a Help ! thank you The JSON response ta at the end…
-
2
votes1
answer97
viewsWebserivce only accepts requests from local server
I have a Webservice in PHP and need to use to integrate two applications. WS returns in JSON the data I need. The problem is that it returns only the data when the request is made from a local…
-
2
votes2
answers1692
viewsHow to pass the `id` of a post via``by ultilizing AJAX?
I would like to update via ajax, but I’m having a hard time sending the id of postage via post or get for the external form: php/editarDespesa.php. The form is not displaying the dados, but without…
-
2
votes1
answer828
viewsDelete data without refreshing the page
I am no longer using extra pages to use functions inside the PHP page. That is PDO use with a php for functions and use everything on the page without loading anything external. My doubt is how to…
-
2
votes2
answers6785
viewsImage upload with Jquery
How to upload image using Jquery? This is a question that has been chasing me for a long time, I hope you can help me. Well, I’ve been researching and I saw that you have a plugin for this,…
-
2
votes1
answer684
views$. ajax does not answer
Code: <script> $(document).ready(function () { $("#submitbuy").click(function () { alert("clicou no submitbuy"); var emailc = $("#emailc").val(); alert("variavel emailc atribuida: " + emailc);…
-
2
votes0
answers16756
viewsError AJAX Request - Success does not work
Good afternoon, you guys, I have the following AJAX request: $(document).ready(function () { $.ajax({ url: "/membros.aspx/populaGridMembros", type: "POST", dataType: "json", contentType:…
-
2
votes1
answer916
viewsrun automatically
I have a code where I will need to have a processing page, and on this page I will need to run a javascript Function automatically. Currently, I run this Function by clicking, like this: <input…
-
2
votes1
answer440
viewsHow to get the value of a UF list through the ZIP Code query via Ajax?
I am developing an address form where the user type the zip code and automatically fills other fields, via Ajax. The problem is I can’t get the value of UF, which in my case is a list. my example…
-
2
votes2
answers2031
viewsSending an image and other data via Jquery to PHP
I have a question I haven’t found a solution to. Need to send via Ajax an image and other fields to a PHP file and save in MYSQL database. I don’t know how I can do that, someone can give me an idea…
-
2
votes1
answer761
viewsChange the value of a <H1> with jquery?
I’m making an ajax call and need to change the value of the tag <h1> with the Sponse: $('#openTickets').ready(function() { var open = $.ajax({ time: 15, url: "/opened-tickets", dataType:…
-
2
votes1
answer1515
viewsHow to update via ajax + php
I want to update data through a modal, however it is not updating. Does anyone have any idea why it is not updating? Modal: <script type="text/javascript"> $(document).ready(function() {…
-
2
votes0
answers22
viewsWhen should JSONP and AJAX be used?
I have this doubt because the two seem to me to be very similar. Someone can explain to me. When to use one or the other?
-
2
votes1
answer102
viewsSelect Query with AJAX and PHP
I am developing a php system and have a page where it lists several results of a SELECT, so far so good... and I have a input text where I would like every letter I typed into it, the results to be…
-
2
votes1
answer1153
viewsPass php session value to Ajax
I need to take a value of a php session that is on a page where I have a contact form and go through Ajax to another page, on this page I make the check if the values are equal or not, but I am not…
-
2
votes3
answers3002
viewsDynamic search in real time
In the company I work we will implement a system in which the Back-end will be PHP and the database will be CACHE (Intersystem). The database is on a server other than where the system will be…
-
2
votes2
answers2611
viewsHow to call an ajax inside another?
need to call another ajax request within a condition. But the outside ajax does not wait for the inside to finish. Example: I wear this $.ajax({ type: "GET", url: "MINHA_URL", success: function (e)…
-
2
votes1
answer860
viewsHow to use jQuery + Ajax with Java EE
I’m creating a connection to the Java database like this: try{ Class.forName("org.postgresql.Driver"); Connection con =…
-
2
votes3
answers487
viewsProblems between loop and ajax
Ajax for (j=0; j < cidade_nome.length; j++) { $.post('envia.php', {ano:ano, ano2:ano2, cidade: cidade_nome[j].value}, fnRetorno); } Function fnReturn function fnRetorno(retorno) {…
-
2
votes2
answers1763
viewsReal time ajax request
Well personal I have a script to request ajax every 1 second to show me new content but now I’m having a problem that it every 1 second updates me all the content I wanted that only shows up if…
-
2
votes1
answer193
viewsAjax request with flashing setInterval
The following piece of code aims to place the contents of a text file inside a div. Like the text file can be updated, the div is intended to be updated with the latest file content. But every 2…
-
2
votes1
answer1201
viewsAsynchronous paging with Laravel
I made a simple pagination with the laravel using the return of ->paginate(), however, as you know, it is not an asynchronous action, which makes paging bad. I found some examples, but I couldn’t…
-
2
votes1
answer2976
viewsHow to clear form data after saving to database? via Ajax . net mvc
after saving an object in the database, the view continues to show the fields filled! <fieldset> <legend>Endereco:</legend> @Html.ValidationSummary() @Html.HiddenFor(e =>…
-
2
votes1
answer107
viewsProblem with push button by ajax id
Good I’m here with a problem that and the next I have a lop while that shows me all users and in each one has a button follow I am doing via ajax by clicking on follow change the text not to follow…
-
2
votes1
answer229
viewsSend more than one JSON file in a single AJAX request
I’m requesting two JSON files by Jquery’s getJSON function. I’m trying to send them through AJAX but I’m not getting through. I did the following: var data = '[{"agents": '+agents +', "projects":' +…
-
2
votes2
answers4321
viewsFormatting date and time with Javascript?
I’m consuming data from a API and would like to know how do I pass the following date and time value, to the Brazilian standard. The format returned is this: 2017-01-05T14:35:17.437 but I’d like it…
-
2
votes1
answer172
viewsUpdate a zf2 view every 1s via jquery/ajax
I have a table as shown below, I need it to update every 1s, but I have no idea how to do. I used an html 5 tag, but it updates everything, I just want to update only the table. My View <?php…
-
2
votes1
answer567
viewsHow to load plugins already configured after page load by ajax
I have a page that has a form In this form, it contains some inputs, which have classes, e.g.: <input type="text" class="datepicker"> <input type="text" class="marcara-cpf"> And the…
-
2
votes2
answers1025
viewsClose get request as soon as you start another
In my Commerce there is a search field. As you type, you return a list of products in a div below the search field. That’s 100% On the label I put an onkeyup that performs a function that searches…
-
2
votes2
answers528
viewssetTimeout not executed in loop(each)
See the function below: $(grupo).each(function (i) { setTimeout(function () { $.ajax({ url: "curltst.php", data: { acao: "teste", mensagem: mensagem, grupo: grupo[i] }, dataType: "xml", method:…
-
2
votes1
answer647
viewsPOST request is not formatted AJAX Jquery
Look at that: HTML <form id="form" enctype="multipart/form-data" action="paginax.php" method="post"> <input name="nome_arquivo" type="file"/> <input type="hidden" value="valor_name1"…
-
2
votes1
answer101
viewsSplit whole text into javascript pieces
Good afternoon, stackoverflow guys I need to share the text I get from an ajax return. That my return has the following pattern It starts with what will be value, the rest will be the content of an…
-
2
votes1
answer73
viewsproblems when updating a table
I’m a beginner in php. Does anyone know why it’s not working? It does the correct update of integer values, but if it is a string of letters it does not work html It will type here a url to do the…
-
2
votes1
answer412
viewsLoad dependencies on demand
I understand by dependency, the need that your script needs or is accessing in some way some method/property or properly an object encapsulated in another javascript file, whether a framework or…
-
2
votes2
answers421
viewsJavascript variable value assignment
I have the JS code below and the return of JSON does not assign the value to variable texto. I did a test with alert(data.frase) and the message came normally. Would anyone know why to go texto does…
-
2
votes4
answers1160
viewsload datepicker plugin on page called with ajax
I’m using the plugin datepicker All my datepicker input, has the class called datepicker <input type="text" class="datepicker"> So, I have only one configuration for datepicker and can use on…
-
2
votes1
answer2103
viewsPass javascript array to php using ajax
Good morning, everyone. I’m here with a question in a php/jquery work and I wanted you to help me In a javascript file I have this code here var categorias; var categoria; var array = [];…
-
2
votes0
answers126
viewsHow I seek information from this autocomplete
<?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html…