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
-
3
votes1
answer1993
viewsDynamic fields with jsf and ajax not rendering mask
I have a JSF form in which I add fields <input> dynamically with AJAX. When I click on <h:commandButton> that trigger the routine of adding the <input> the field is added however…
-
3
votes2
answers512
viewsHow to pass javascript value to AJAX
I have a javascript function that has an AJAX code inside it. I want to pass the javascript values to AJAX, follow the code: function validarCamposComprar() { var campoNomeEmpresa =…
-
3
votes1
answer1087
viewsHow to add a custom header in AJAX with pure javascript?
I am using pure javascript to send an AJAX with the Access_token header with a key inside, because the web-service asks for this request... but it is not going as I would like. I want you to stay…
-
3
votes2
answers1694
viewsCheck fields when giving Ubmit and if error return to field
I have a very long form and would like to click on Ubmit and the field is in error, that the page can scroll (jQuery) to this field so that the person knows exactly what is wrong. I started out that…
-
3
votes2
answers3680
viewsHow to do the . jQuery load only the content inside the <main>?
How could I make for that function .load instead of loading the contents of <body> only load content inside <main> ? My jQuery: // Checa se a página foi carregada para evitar aplicar os…
-
3
votes1
answer92
viewsIndex and automatic values
I have the following Json: {"result":[ [ {"ID_CTE":"1","ABREV":"301CAGSP","MODELO":"CT","NUMLANCTO":" 71","NUMCONHEC":"…
-
3
votes1
answer2103
viewsRunning processes in the background - Accessing same script twice
I have a PHP script that aims to integrate with a third party system. Basically, my script sends image and text files to the client’s ftp. To ensure processing for a long time, I use the following…
-
3
votes2
answers150
viewsJavascript + Ajax not returning as expected
I am trying to send the data of this page to the server, but Js does not return the variable Message... Link I know little about JS and would like to know somehow call the variable as soon as the…
-
3
votes1
answer367
viewsHow to make Footer stay in the footer after using AJAX?
I have done several applications and always used the method below to regulate the height of footer. Always using Bootstrap. HTML <div id="footer"> <div class="navbar…
-
3
votes1
answer70
viewsBy creating a search link?
I have a problem in a project, there are 3 product search fields and a search button. example: https://jsfiddle.net/juliomoreira666/u3ss4uye/ He wanted that as the fields were being filled, the…
-
3
votes1
answer205
viewsAsynchronous server responses for AJAX calls
I have an application that at the end of a page loading I make an AJAX request that takes around 20 seconds. After this request my page keeps working normally so that when I try to make another AJAX…
-
3
votes3
answers1211
viewsHow to modify form fields if user input is invalid compared to regular expression with Jquery
Guys, I have the following form: <!DOCTYPE html> <html> <body> <form action="enviar.php" method="post" accept-charset="utf-8"> <label>Nome<br> <input…
-
3
votes2
answers154
viewsRead XML received from ajax - PHP
In php using the command var_dump($_FILES ['filexml']); I receive the following values from ajax array(5) { ["name"]=> string(56) "nomeficticio.xml" ["type"]=> string(8) "text/xml"…
-
3
votes1
answer49
viewsPDO showing connection data if catch trigger inside Alert(result)
Because in my alert(result) ajax the catch of PDO is showing my connection information to the database as shown in the following image: http://puu.sh/bel2Z/e7f230ab8d.png Code: $pdo = new…
-
3
votes2
answers763
viewsJquery consuming Web Service Rest
I would like to list the ceps of this json, follows him: [ { "id": 1, "nome": "Hospital Da Mulher", "cep": "60508090" }, { "id": 2, "nome": "Hospital Maria jose", "cep": "2" } ] And that’s where I’m…
-
3
votes2
answers100
viewsInsert record into bank by clicking div x
How can I enter a record to the database by clicking on a div x I tried to use ajax but could not do the function I have the function $status = "on"; db::Query("UPDATE bdc SET status='$status'"); I…
-
3
votes1
answer245
viewsAjax response repeats that of another request and the page is not even the same
The scenario is this: I have an ajax that is waiting for a response from the Java server on port 2336 like Hotmail, and as soon as it is updated, Java returns the response and closes the open HTTP…
-
3
votes1
answer148
viewsDeezer API - JSON request error with $.getJSON
When trying to perform a simple search on Deezer API (Public Search API without Need for Authentication Key) I get the following error message as return: XMLHttpRequest cannot load…
-
3
votes1
answer569
viewsHow to iterate over a JSON file to appear in the Auto Complete listing?
I’m making an autocomplete, via AJAX, that enters the web service, "Search in the Database" and returns me a String in the format JSON. I have to transform the JSON below in a list to iterate on it.…
-
3
votes2
answers107
views -
3
votes2
answers268
viewsSpace Lock with REGEX
My code for locking characters is like this: $('#rg').on('keypress', function() { var regex = new RegExp("^[ 0-9]+$"); var _this = this; // Curta pausa para esperar colar para completar setTimeout(…
-
3
votes3
answers124
viewsHow to use multiselect value in php
I’m taking a value from a multiselect and sending it via ajax: Assuming the value of multiselect is: ["1","2","3"] // é esse valor que está sendo enviado (value do multiselect) After rescuing this…
-
3
votes1
answer824
viewsSend multiple values in an input to PHP, using jQuery AJAX
I have a script to insert several items in a list of a form, using Ajax. For each element inserted in this list, a next one must be added. After inserting X elements, it should take all values and…
-
3
votes2
answers1150
viewsHow to make a tutorial first access to the site?
I would like to create a First Access to My Website Tutorial, those that show what each field of the site means, I need a hint of how to do or if there is any Framework for this type of interaction…
-
3
votes2
answers3812
viewsSend form data via GET to server (without updating page)
I have this form and would like to give a GET for variables with their value when clicking the button, without refreshing the page because I have other forms on the same page, it is possible with…
-
3
votes2
answers2958
viewsHow to find the origin of the request in PHP?
Hello, I have a PHP page that receives ajax requests from another page, in another hosting, this was possible using header('Access-Control-Allow-Origin: *'); So far so good, but I’d like to know…
-
3
votes1
answer794
viewsWebservice of the post office for more than one product per freight
Hello, I’m using the webservice of the correctors: http://ws.correios.com.br/calculador/CalcPrecoPrazo.asmx To calculate the freight cost and term. The call is made via JS(jquery/ajax) and the…
-
3
votes1
answer72
viewsWhy does AJAX allow synchronous use?
Hello, in my AJAX studies, the form of synchronous transmission is always seen with bad eyes, and the widely recommended form of transmission is asynchronous. If only asynchronous is the one we…
-
3
votes2
answers144
viewsSearch in Clipping OAB
There are several programs ( for lawyers) who read the cut of the OAB, the evolution of the process, automatically, bringing to it these changes daily. The idea is to put inside a mini system of…
-
3
votes1
answer1814
viewsWhy does my Jquery code not work on elements loaded with . load(), how to load them?
What is the correct way to load my jQuery scripts together with . load(). I did this way but wanted another solution that works with all the updates that occur with the form, as remove of products,…
-
3
votes3
answers323
viewsOptimize Ajax Search that Shows Slowness
I have a problem of slowness in this research in ajax. <script type="text/javascript"> $('#nome').keyup(function () { var chars = (this.value); $.post('../Ajax/busca_nome', {val: chars},…
-
3
votes1
answer36
viewsUpdatepanel - Always and conditional together
I have a question. Is it possible to fire event only on updatePanel conditional while it is inside another that is not conditional? Follow the example: <asp:UpdatePanel runat="server"…
-
3
votes2
answers519
viewsShowing the result according to loading and do not wait for the script to finish to display the results on the screen
My question is the following: the code is working as expected the problem when I put a large list of email (100) the page gets all blank "Loading" and only returns me the result after the script…
-
3
votes4
answers347
viewsIs there any way to detect if there are any asynchronous calls being run?
I need to run a loop of asynchronous calls, but they cannot run simultaneously, I have to wait for the end to run another. Only I have no control over this call(It is a js function of Sharepoint…
-
3
votes1
answer1897
viewsReturn JSON with ASP.NET/C#
I have the following codes Default.aspx <script type="text/javascript"> /* Relógio */ function startTime() { $.ajax({ type: 'POST', url: 'Default.aspx/GetNetworkTime', data: "{}", contentType:…
-
3
votes1
answer458
viewsHandle ajax request returned data with Jquery
My request: $.post( "http://painel.thomerson.com.br/imagens/escolher-template", $(this).serialize(), function(data){ $("#Resultado").html(data); } ); What is happening is that by inserting the…
-
3
votes2
answers7594
viewsHow to use the $.ajax function date parameter
It is possible to send two JSON at the same time as the parameter value date jQuery.ajax()? Is there any way to call these two arguments, since I need to call these two json and show on screen?…
-
3
votes1
answer1470
viewsHow to get value from a variable in the controller with ajax(jquery)
I have to take a value from a variable within a method in the controller on . net, the method is in homeController and returns a json, up to there everything well the code is running and returning…
-
3
votes2
answers2939
viewsAjax/Jquery - How to know if a request has been completed?
I have a simple ajax like this: function ajax() { $.ajax({ url: "../../api/utilitarios/cidades/estado", method: 'POST', dataType: 'json', success: function (data) { }, error: function (data) {…
-
3
votes3
answers1606
viewsHow to request via post for action by AJAX?
I cannot access my action through ajax request: <legend>Procedimento:</legend> @Html.HiddenFor(p => p.CodigoProcedimento, new { id = "codProcedimento", name = "codProcedimento" })…
-
3
votes1
answer47
viewsDisable automatic refresh from a Grid
Hi, I’ve been trying to disable refresh a for a long time AjaxUpdatedControl of a RadGrid which occurs when I click on a button of this Grid. Does anyone have any suggestions on how to do this?…
-
3
votes1
answer133
viewsAJAX sends information to PHP but fails to insert only one data
Look at my code: HTML: <script type="text/javascript" src="js/jquery-2.1.1.min.js"></script> <script type="text/javascript" src="js/criaEvento.js"></script> <form…
-
3
votes1
answer252
viewsCreating Archive.php in wordpress using custom field
I’m trying to create a calendar page in Wordpress where the user selects the month by a select: <select> <option>Janeiro 2015</option> <option>Dezembro 2014</option>…
-
3
votes2
answers613
viewsAjax Jquery return variable giving error
I have the following script on ajax: $("#contato").on("submit", function () { if($('#descricao').val() == "") { //verifica apena o texto alert("Descrição não está preenchida!");…
-
3
votes1
answer804
views'Load More' button duplicates or does not work AJAX/JSON
Whoa, everybody, all right? Next, I have a table that is fed with content from an external JSON file (created from PHP with data coming from DB). When opening the site, the table comes with only 2…
-
3
votes1
answer3498
viewsDynamic update without refreshing page
Whoa, everybody, all right? Next, I’m doing an administrative area and would like the content to update dynamically without the need to refresh the page to see if there’s anything new. For example,…
-
3
votes1
answer641
viewsTomcat 8, Ajax (jQuery), Jersey, REST API does not work, enable CORS
I have been trying for a while to configure CORS to work with my Tomcat 8. But whenever I have to submit the POST request, I get the error message: "Response to preflight request doesn’t pass access…
-
3
votes2
answers146
viewsA notification system using setInterval + AJAX is bad?
Because there are several requests to php+myql, little interval (millisecond thing), multiplied by several users online at the same time, this is not feasible, in the sense of computational…
-
3
votes1
answer427
viewsProblem with Spring MVC + javascript
I have a problem related to Spring MVC and javascript/Jquery. Well I have a jsp with a form and I needed to do a test where when clicking a button jquery clears the text of some "input type='Text'".…
-
3
votes2
answers64
viewsHow to return function correctly? (Variable Scope)
I have the following function that performs a request to an API using Angular and I would like the function to return the data, but I am experiencing variable scope problems: var…