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
answer828
viewsVariable within GET Ajax Request
Good afternoon, I need a help, I have this request get from ajax that sends to the web service, and I need to put this variable id, in the url, because inside the webservice I take this variable and…
-
0
votes1
answer32
viewsAjax function with php is not working
I have this code plus ajax doesn’t even carry a value $.ajax({ url: 'php/vizCliente.class.php', type: 'POST', data: { update: '1' }, cache: false, datatype: "json", error: function(e) { alert('Erro…
-
0
votes0
answers224
viewsSecurity request AJAX
Know how I can get more security when sending data via AJAX? As the data will be sent by the customer, I want to avoid fraud, etc.. Today I can the following function: console.log("funcoes…
-
0
votes2
answers700
viewsTaking URL Variables from One Page, and using another
I have a link in which I receive the parameters in the url completely, in case it points to an HTML where I have my inputs, and I receive the URL with the parameters, what I need is to take the…
-
0
votes1
answer396
viewsPass PHP variable to another page using Ajax, and update value of an element
I have the following code gerar-relatorio-extrato.php: try { $pdo = abrirConexao(); // Selecionar extrato $consultaExtrato = $pdo->prepare($sql); $consultaExtrato->execute($insertData);…
-
0
votes0
answers968
viewsUnexpected token < in JSON at position 0 at JSON.parse(<Anonymous>)
I am trying to get the data searched in a given text field of the main page to be displayed without the refresh of the page, through AJAX. window.onload = function(){…
-
0
votes0
answers278
viewsPDO, Select a query with some fields, from a certain user and code
I need to set up a consultation where I’ll only have five fields (STATUS, ID_USUARIO, PACKED, ID_TRANSACAO and ENTREGUE). I need that when I have change of STATUS change to another table, and update…
-
0
votes0
answers71
viewsProblems jquery ajax
I have a problem which is this: in my system I have a combo that serves as parameter to load( via ajax) a second combo, this works normally. Hence I need that when clicking an item in a table, the…
-
0
votes1
answer138
viewsJquery returns "0" in div
I have a function ajaxForm that searches some data in the database and should return the HTML result in a div. The problem is that when inspecting the page the return is correct, but in div appears…
-
0
votes1
answer346
viewsDynamic Combobox Ajax Codegniter
Hello! I’ve already looked this question and won’t answer me. I have a select called Bank, as below and brings me the result OK: <select id="banco" class="banco form-control" name="sel_banco_id"…
-
0
votes1
answer35
viewsinsert comments without refreshing the page
Can someone help insert comments into my database and then show them without doing refresh page? INICIO.PHP <!-- BIBLIOTECA JQUERY(OFF-LINE)--> <script…
-
0
votes0
answers59
viewsI cannot enter the Success json function
Dai galera.... I am unable to pass the return of my code to the function Success of my ajax via json.... I am using codeiginiter, php, mysql.... someone can help me.... it’s been almost a week that…
-
0
votes0
answers68
viewsPHP does not display array data!
Friends, good night. In my code, I send the following: function cadastrar(){ var t = 0; var nome = $$("#nome").val(); var cpf = $$("#cpf").val(); var tel = $$("#telefone").val(); var end =…
-
0
votes1
answer42
viewsApplying style to table in javascript
I have a table <div class="container-fluid" style="margin-left: -29px; margin-right: -29px"> <!--Striped Rows--> <div class="row clearfix"> <div class="col-lg-12 col-md-12…
-
0
votes3
answers1010
viewsUpload with ajax and java
I am doing an image upload with ajax (already tested without ajax and it worked). JS: $("#upload").on("submit", function(e) { e.preventDefault(); $.ajax({ url: $("#controller").val(), type: "POST",…
-
0
votes1
answer280
viewsChange the status (online/offline) in the bank when closing the page
I’m making a chat system for a panel, and I already have it ready practically, everything connected to the database, when it login changes to online and when it comes out(click the button) it…
-
0
votes1
answer249
viewsAJAX return JSON size
I’m having doubts about using AJAX, I’m doing a function to assemble a list according to some filters. Everything is working perfectly, I return the JSON and mount the table. The problem is when my…
-
0
votes1
answer73
viewsjquery ajax printa index on screen
I’m having problems with jquery because it rather print on the screen only echo of my php it is printing all index on the screen how to solve this ? <script…
-
0
votes3
answers379
viewsProblem with onkeyup input
I made a small Javascript function to make a dynamic search in the database without giving refresh and it’s working, but I think there’s a problem with onkeyup. When inserting text into field input…
-
0
votes2
answers377
viewsUnable to convert JSON List to Array in Javascript
I’m having trouble getting the javascript data from a json. To better explain, the data comes from the database, thus: //PHP $rs = mysqli_query($con, "SELECT id_acao as id, text FROM acoes"); $data…
-
0
votes1
answer26
viewsResults of disordered requisitions
I have 1 textarea with several lines, to each line of this textarea I have data to make a post request in a single url, it checks each line and sends me the result on the screen via jquery, the…
-
0
votes2
answers557
viewsUse PHP variable in Ajax
By clicking on the positive board (indicated in the figure by an arrow), the user accepts the friendship invitation. I need to pass the user id (value 15) to the update-friends.php page. The event…
-
0
votes1
answer387
viewsPass and receive data to Servlet in the same AJAX Function
Do you have any way to send parameter to Servlet and receive a json in the same AJAX Function? Example of what I need: function UpdateGrafico(){ $(function () { //--------------------- //aqui…
-
0
votes1
answer400
viewsif (isset($_POST['send'])) does not work with Ajax
I am sending information to another page via Ajax: <script type="text/javascript"> //Função para enviar as informações para o arquivos processa.php //via Ajax function envia(x){…
-
0
votes1
answer48
viewsUnserialize Codeigniter Data - Ajax?
Through the object obj_form, i display in the form the database data: //Objeto do formulário function obj_form() { $('[name="id"]').val(obj_permissao.id);…
-
0
votes1
answer217
views -
0
votes1
answer80
viewsHow to put a successful Alert into a data insertion via ajax?
I am working on a project in progress and what I need to do on it is put an Alert and refresh the page after entering data in the database. The data are being entered through a spreadsheet, that is,…
-
0
votes0
answers165
viewsProgram expect response requisicao ajax?
Guys, I need to do several ajax requisicoes inside a loop and the program can only continue after the request is completed. I am using "async:false", but it hangs the whole page while waiting for…
-
0
votes1
answer291
viewsPassing an array with ajax to php
I’m trying to delete multiple records, where I try to get input with Ajax and move on to the PHP. Printando on the console I can see that I’m picking up the values, but when it comes to going to…
-
0
votes0
answers26
viewsDoes not enter the ajax block
Good Morning! I have the following code: <?php $titulo = "Site"; ?> <html> <head> <title><?php echo $titulo; ?></title> <link rel="shortcut icon"…
-
0
votes0
answers43
viewsdoubt with Ssion
I’m trying to open a Session in php but it does not save value, I wondered if it is the way I do the redirect so I wanted to take my doubt, basically what I do is take the login and password and…
-
0
votes3
answers805
viewsDelete records without updating page
I’m trying to delete records without having to refresh the page, but I’m not succeeding, the records erase but the table only updates if I give an F5, I’m trying to do this via ajax but it’s not…
-
0
votes2
answers294
viewsStart function by Onclick
Boa Tarde Amigos. My question is this, I have a script that keeps reading one. log basically in real time and shows it on screen, but the point is that it starts with the DOM, I would like it to…
-
0
votes1
answer611
viewsRetrieve dynamic checkbox value in php
I have a table where one of your columns is a checkbox, I need to do when the checkbox are selected click on a "Delete Selected" button where it is possible to recover for me all the values of the…
-
0
votes4
answers506
viewsAjax, limit time even giving Reload on page
I have the code that does what it has to do, and when it finishes it hides the button and shows the message of success: function getFollow() { $('#btnFollow').click(function(a) { a.preventDefault(),…
-
0
votes0
answers39
viewsIs it possible to perform an external UPLOAD with ajax?
I have this code: function uploadFile(x){ //DEFINIÇÃO E RECEPÇÃO DAS VARIAVEIS PRA ENVIAR COM O AJAX var file = document.getElementById("id_arq_documento_" + x ).files[0]; var id =…
-
0
votes1
answer49
viewsProblems Webservice ASMX
When I send a JSON return and the text is accentuated, JSON breaks. Here is the request code in the Controller $http.post("../backend/controller/SugestaoController.asmx/comboListarSugestoes", {…
-
0
votes1
answer163
viewsAdd tooltip to button that came straight from Php via Ajax
On my PHP server I return some data between them a button $HTML = " <button id=\"btnExcluir\" style=\" width: 55px !important;\" onclick=\"Excluir();\" type=\"button \" data-toggle=\"tooltip\"…
-
0
votes2
answers101
viewsSelect with checkbox
Guys, my question is, would I make a query in mysql bank and play instead of cities ? <html> <head> <title></title> <link…
-
0
votes1
answer149
viewsJquery Chosen not returning value
How to make the Chosen display value of the search. It is not showing the options within select. HTML <select id="habilidades" name="habilidades[]" multiple class="input col-lg-10 chosen-select…
-
0
votes1
answer199
viewsAutocomplete insert the value into two different inputs?
I have this code <script type="text/javascript" src="js/jquery-1.4.2.js"></script> <script type='text/javascript' src="js/jquery.autocomplete.js"></script> <link…
-
0
votes1
answer323
viewsSearching for data via ajax
I have an API running local with the address http://localhost:8080/core-web/Rest/usuarios/79. The number 79 at the end is the user id. This API which is in JAVA returns me the following data: {…
-
0
votes2
answers323
viewsExecute document and send variable value in PHP by Ajax
Hello, I have to develop a confirm button for deletion of a product. For this, I had the idea of running a file in php through ajax from the moment I click on "Confirm" in JS confirm, along, passing…
-
0
votes1
answer96
viewsHow to pass, via AJAX, multiple forms with multiple files
I have 3 forms on the same page, where each form has inputs of the file type. I need that when clicking a single button, it is possible to forward, using Ajax, correctly all fields (mainly that…
-
0
votes1
answer567
viewsAjax and PHP Update
I’m having a problem editing the database values. My Script Code: $(function(){ $(document).on('click', '#salvar_pedido', function(e) { e.preventDefault; var id =…
-
0
votes2
answers865
viewsError when receiving php array in ajax
I have a script as following code: $("#submit").click(function(){ var dataString ={ nome : $("#nome").val(), status : $("#status").val(), id : $("#id").val() }; $.ajax({ type: "POST", url:…
-
0
votes0
answers275
viewsHow to update Mysql database with Ajax + PHP
I need to update my Mysql database asynchronously. I have a table with bank results. <?php $sqlCategoria = "SELECT * FROM categorias"; $resultCategoria = mysql_query($sqlCategoria);…
-
0
votes1
answer59
viewsHow do I pass a javascript value to PHP?
I have a select that lists all my players: <select name="jogador" id="cod_jogador"> <option name=""></option> <?php foreach($jogadores as $jogador): ?> <option id="codigo"…
-
0
votes1
answer44
viewsProblem showing popup when sending forms
I developed a form, when the user clicks on the send button a GIF appears and then a modal has to appear saying that the information has been sent so far all right the GIF works normal but when the…
-
0
votes2
answers398
viewsSession does not work as expected in Ajax and PHP request
Well I have a main page index php. where the person executes an action and makes a request POST with Ajax. In this main file I create a session with some data that I want to keep safer and not be…