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
votes0
answers31
viewsAjax (Angularjs) returning HTML from the page itself
I am using Codeigniter to retrieve the database data. Controller: <?php defined('BASEPATH') OR exit('No direct script access allowed'); class Welcome extends CI_Controller { public function…
-
0
votes1
answer111
viewsExecute ajax on page with more than one form
I have this Ajax code that makes the request for a PHP file, when there is only one form on the page, it works right. How do I make it work when you have more than one form? JS that works…
-
0
votes1
answer31
viewsAjax event does not run with modal
I have this ajax. I call a modal, which in theory, when clicked on an id, would execute this ajax, but does not execute. $("#ClassificacaoId").on('change click', function () { valor =…
-
0
votes1
answer188
viewsHow to iterate PHP array received as JSON?
I got the following JSON, that I create by the method JSON.stringify(dados), and walkthrough ajax to the php: {"nome":"nome_da_pessoa", "registro":"registro_da_pessoa",…
-
0
votes1
answer81
viewsVery slow query to export in excel
I created a method to export a few columns to xls and it is very slow the process, it takes about one minute to do the whole process. public void Download(string datainicio, string datafinal, int?…
-
0
votes1
answer176
viewsSending PDF and JPEG files with Jquery/ajax
I am trying to implement a pdf or jpeg file upload with jquery ajax and am not succeeding, so I am in need of a help if possible. Trying to use jquery in conjunction with PHP, but cannot pass the…
-
0
votes1
answer56
viewsAjax does not send image to folder with PHP
I am unable to send the image to a folder, using Ajax and PHP, the file name sends correctly, it is only the file even if it does not write to the folder, the folder already has permission chmod…
-
0
votes2
answers742
viewsHow to put paging in foreach that returns a JSON list with ajax
I call this function which returns me a list and populates a table in the view, updating every time I pass a parameter through the filter. Everything works perfectly, just need to put paging,…
-
0
votes0
answers36
viewsRecording in DB does not work when using alertigo.js
I have a code to update and delete data in the database so that unfortunately it shows the custom Alert on the screen so it does not write to the database and does not update the bad page but save…
-
0
votes1
answer414
viewsHow to change the class of the div according to Ajax’s response?
Hello, I’m a beginner in PHP and Ajax and I’m creating a form for password recovery that validates the user’s email, date of birth and Cpf and sends the password to the registered email. Node code…
-
0
votes0
answers97
viewsCustom Loading on Demand
Hello folks would like to make a shipment on demand, but I’m not getting to assemble. Just follow my code: function show(letra) { var itens = ""; $.ajax({ type: 'GET', dataType: 'json', data:…
-
0
votes1
answer667
viewsPopular select from countries and states with php mysql ajax
I have 2 selects: #parents and #status. I want that when selecting the country, it populates the state only with the states of that country, which are written in a mysql table: tabela_paises id|pais…
-
0
votes1
answer326
viewsHow can I send a PHP variable on one page to another Javascript page using Ajax?
Hello, people, I’d like to know how to send a php variable to another javascript document through Ajax. The PHP variable in question is this: $json = json_encode(simplexml_load_string($show)); Here…
-
0
votes1
answer123
viewshow to send an image to php through a hidden input='file'
I would like to know how to send my <input type="file"> to the php through the ajax. I wrote the code but the same does not call the url php and does not return me error. html code: <button…
-
0
votes1
answer143
viewsSearch system with charging on demand
I have a search system with load on demand with php and jquery, I can search for letters correctly, and I do the load on demand correctly, the problem is that when switching letters to search, it…
-
0
votes1
answer34
viewsTwo Ajax Form on a single page with multiple items
I can make an Ajax request as follows: HTML <div class="resultado_debito<?php echo $i ?>"> <span class="ruim"><br>Inadiplente</span><br> <form method="post"…
-
0
votes1
answer56
viewsHow do I pick up php variables and move to a different JS file with ajax?
Next I want to pass a php variable to Javascript only in different files, I have a code template that is this: $(document).ready(function(){ $("#botao").click(function(){ $.ajax({…
-
0
votes1
answer50
viewsMysql query with AJAX
I created a table "usuario" in the MySQL containing name and password. I have established a connection with the PHP and I would like to consult on AJAX, to validate this name and password and print…
-
0
votes1
answer5249
viewsAjax and dataType JSON
When I do so, the return is a parsererror. $.ajax({ type: "GET", url: "servicos.php", data: "id=1", dataType: 'json', ==========================> Essa linha bem aqui success:…
-
0
votes0
answers37
viewsDoubt about Session()
I have a question about the use of sectionals. I’m building a dynamic query system to get data from my database when I click on a link, each link passes an id through the URL. On the page where the…
-
0
votes0
answers107
viewsJSON DOES NOT RETURN
I am updating the database. But the json does not return. Can you please help me? JQUERY FILE $(document).ready(function($) { // Evento Submit do formulário $('#myForm').submit(function() { //…
-
0
votes1
answer89
viewsHow to create a real-time list with PHP and Ajax
I’m creating a recipe site, where the ingredients will be registered individually in a table, referencing the recipe id, example of how the tables are: ptp_receitas id|nome 1 |receita de feijão…
-
0
votes1
answer226
viewsPerform one page function on another
I have a question regarding my project. I have a button in a page "x" that when clicking it checks the geolocation in Google maps (fills the inputs with the coordinates). So far so good, I need to…
-
0
votes2
answers67
viewsjQuery bring value from Mysql table
I’m setting up a music list register for a karaoke site. It works like this: Search for pre-registered music Take this song from input and insert it into a li list I have the following: <input…
-
0
votes2
answers155
viewsReset Form after Upload
Good morning, I have a shipping form, but the data is in the inputs so I click to send... how to reset the Forms? Follow the code <?php header('Content-type: text/html; charset=utf-8');…
-
0
votes1
answer42
viewsObjects with javascript
How do I access data from this Json file. For example return the name: { "potions": { "1": { "id": 1, "name": "Aging Potion", "image": "aging-potion.png", "price": 29.99, "effect": "Causes the…
-
0
votes1
answer110
viewsRequest sent more than once when selecting a form field
When I select a specific field from a form, I trigger a request to load some essential information to complete the form, only when selecting a form field it fires 3, 4 requests and this causes my…
-
0
votes0
answers60
viewsProblems when passing parameter by POST via Ajax
I’m having trouble passing parameters via POST to my PHP methods. I have the variable in JS properly populated with the attributes I want to pass on. But when trying to access the variable in my PHP…
-
0
votes0
answers117
viewsSend data stay on the same page
I would like my input’s text DE/PARA to write to my xml file (write) When I click send when I go to my xml file ,it even appears in the file details the date and time I clicked to send , and when I…
-
0
votes1
answer416
viewsError while consuming webservice in c#
I am making a web service in c# , to consume its data via javascript (without being an application made in Asp.net or any technology . NET ,I want to use html and javascript only). My web service…
-
0
votes1
answer37
viewsSelect with filter in Entity being generated duplicate
I have a droplist that lists the states, that when a state is selected it filters the cities related to that state. It turns out that when I select cities comes duplicate. For example, I have states…
-
0
votes1
answer196
viewsError 403 on request via $.ajax to instagram
Does anyone know why this request via error 403 ajax and URL works normally? instagram changed their api and I found this code that serves as a media pagination, when I request via ajax it from the…
-
0
votes1
answer139
viewsInsertion of HTML elements within another HTML Generated with Jquery in the same function
In my following code below I would like to insert the data coming from the ajax request, along with the append() HTML only in the elements whose Hidden input id was equal to the item.id (of…
-
0
votes3
answers536
viewsWhy can’t I pass summernote name="" via ajax
After some tests I saw that summernote does not pass the name="" via ajax request, someone can tell me why? $(document).ready(function(){ $(document).on('click', '#submit_btn', function(){ var…
-
0
votes0
answers96
viewsAjax does not return callback on ios
I have the following problem, when I try to run my code it arrive in beforeSend but it does not return me if an error happened or was executed successfully, someone could help me with this. On PC…
-
0
votes0
answers109
viewsProblems with loading . js and . css into external files . php
I have an application that is presenting a problem that had never happened before, recently I started using Javascript to load content without refresh using ajax, but this caused a problem. Every…
-
0
votes1
answer294
viewsInsert XML into Mysql table
I have an xml with the name of some movies, I want when I press a button in html the names are inserted in a table in the database. I made the connection to php using ajax. The problem is that when…
-
0
votes3
answers109
viewsRun Ajax script automatically
I’m having a problem with a college project. I would like to know how to run this Ajax script automatically: <script type="text/javascript"> function buscaCep() { var cep = $( "#cep" ).val();…
-
0
votes1
answer577
viewsReturn PHP Error to Ajax
I’m making a Insert field input in the database using ajax and PHP. In the code below I am returning to the ajax a success message if all goes well, but how do I return a message if there is an…
-
0
votes1
answer117
viewsWhat way can I validate current time
How could develop routine [code block], in order to treat the text field where to insert the Hours in real time (Current time, resulting at the moment). In case the user tries to add hours past -…
-
0
votes2
answers123
viewsHow to make logic enable text field at a time when filled
How should I proceed with logic? There is a Data Registration Form on the page, to know: Name Surname Age Cellular I need to leave these fields as follows: 1- When the tab is loaded the field…
-
0
votes1
answer60
viewsReturn multiple elements by ajax
My question is this, I have a table on MySQL with id, pesquisa and data. I want to give a select in this table on php and return by ajax so that I can insert each element into a td specific within a…
-
0
votes1
answer371
viewsGoogle Chart, PHP and Ajax - Pie chart does not show
I’m not able to plot the Chart pie from google Chart. When I change the type of chart to Barchart or columnchart, it plots, but when I put piechart it does not divide. File that takes data from BD…
-
0
votes1
answer1814
viewsTake all data from an HTML table and insert it into the database
I have an editable table in html, when clicking save, I need to take all the data of the table, send by ajax to the page that makes the INSERT of all the lines in the database. My doubt would be:…
-
0
votes1
answer69
viewsHow to receive ajax data in a vector?
Hello guys I’m trying to do this, but unsuccessfully: HTML: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head>…
-
0
votes1
answer100
viewsHow to use http://loudev.com/ (multiselect.js) in PHP, or how to select items from a select Multiple
<table name="tbListagem" id="tbListagem" class="table table-striped table-bordered"> <thead> <tr class="info"> <th>Código </th> <th>Nome </th>…
-
0
votes2
answers641
viewsList and sum selected items
I need to list the value in (R$) inputs and select html, as if it were a shopping cart, but I need this list and total value to be presented in real time to the user to be sent the list by email...…
-
0
votes2
answers191
viewsCalculate the total of each row in the table
I’m trying to use Javascript to dynamically calculate my prices multiplied by the quantities and result in the total for each row, however it calculates the overall total and plays in the last field…
-
0
votes0
answers20
viewsError while capturing existing data
I have two AJAX services. In one of them I search the user data in a JSON that an API returns to me, I parse it and ask it to insert a certain data for me in a tag . The code is this: if(xhr.status…
-
0
votes1
answer2310
viewsUpdate data automatically without refreshing the page
Maybe this doubt is quite "beast", but I’ve tried several ways and I’m not succeeding. I have a page that counts a quantity of products, but I need the data presented through the query that is on…