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
votes0
answers90
viewsAjax/Json POST treatment
I’m having trouble sending Json to my PHP Controller: See, when sending my Login the parameters that are being sent in the request are exposed, thus being a vulnerability. My question is whether I…
-
1
votes1
answer240
viewsWhy doesn’t the ajax work?
I have a code that does what I want, but refresh the page. I have tried several ways to use ajax to send the data to the database, but it still doesn’t work, and I have 3 questions about ajax: 1 -…
-
1
votes1
answer503
viewsTwo Ajax requests in the same function
When loading a page, I have two Ajax requests in sequence that fill two select s with options coming from different tables in the database. But only the first is executed, the second does not even…
-
1
votes0
answers2743
viewsAjax request with Authorization header
I’m trying to make an ajax request but it needs a BASIC authentication, follow my code: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>…
-
1
votes2
answers145
viewsCreate array with AJAX and send to another PHP page
Is there any method of creating an array with AJAX to send the value of the selected input to another page where PHP will receive? there may be several input’s depending on the page, but page that…
-
1
votes0
answers65
viewsConvert currency to 1,000.00 format
I am using a custom script that prints the value of the coin with comma, but this inserting point in the case of thousands. Currently he prints like this: 1000.00 I need him to print that way:…
-
1
votes1
answer437
viewsLoad table via AJAX
I’m trying to load the data from a table, via ajax, this way: function buscaFornecedores(id) { var url = "/Produto/BuscaFornecedor"; $.ajax({ url: url, type: 'GET', data: { id: id}, success:…
-
1
votes2
answers70
viewsChallenge create menu with ajax() request
json product.json file { "produto":[ {"categoria": "#home", "nome": "home"}, {"categoria": "#fotos", "nome": "fotos"}, {"categoria": "#contato", "nome": "contato"}, {"categoria": "#perfil", "nome":…
-
1
votes0
answers35
viewsIs it possible to assign the same URL to more than one controller?
I’m trying to use AJAX $.ajax({ url : urlN, // <<- "/log" type: "post", success : function(json) { console.log(json); document.getElementById('content').innerHTML = json; }…
-
1
votes1
answer1026
viewsReceiving data via Ajax in PHP
I’m creating an application with React, and the back-end part with PHP I have ajax request: pesquisaCliente(e) { e.preventDefault(); $.ajax({…
-
1
votes2
answers624
viewsHow to use AJAX in an iframe?
To put it in context: I am trying to get only one part of my HTML page updated every 5 seconds. For this, I am using AJAX. In the middle of the development, I found myself with a problem of not…
-
1
votes1
answer28
viewsLoad decimal configured data
I have this function, it works, it brings the necessary data to appear in the input, however I wanted it to bring in decimal, if it is 10,00 it is appearing only the 10 How can I correct? function…
-
1
votes1
answer198
viewsGenerate Pdf via ajax.POST with Rotary
I want to generate a. pdf file using Rotary, my ajax call is as follows: $.ajax({ type: "POST", url: "Home/Index", data: { nome: inputName, laudos: laudos, imagem: imgSelecionada }, }); And the code…
-
1
votes1
answer1701
viewsHTTP Basic Authentication with AJAX and php
I am trying to do a simple password authentication using HTTP BA. follow the codes: login.php <?php if(!(isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW']))){…
-
1
votes1
answer153
viewsTypeerror: $.event.props is Undefined
I have a slider like this for example: http://themes.audemedia.com/html/servereast/vps-slider-6-plans.html In my case it is presenting the following error in the console when I click on the…
-
1
votes0
answers25
viewsDisplay the AJAX result in a popup
I am trying to run a function that will send data from a form to a server and bring a response to the user in a popup with CSS styles. I’m not able to display this popup with the result. <script…
ajaxasked 6 years, 2 months ago Gustavo Henrique de Faria 11 -
1
votes4
answers958
viewsSend form without close modal
I have a page with job opportunities, when I click on a button it calls a modal and displays a form where when sending the information I need it to not reload the page and display a confirmation…
-
1
votes1
answer180
viewsProblem sending JSON by ajax to PHP
I’ve been trying to solve this problem for a couple of days, and I saw some questions from this site, but none of them solve the problem. I’m putting Ajax in the login of my TCC, but it will not, no…
-
1
votes2
answers48
viewsMy function is not running on page loading
I’m having the following problem. I have the following function function sortTable() { arr = JSON.parse(localStorage.context_data); $('#tableLemos th').click(function () { console.log("funcao…
-
1
votes1
answer197
viewsEdit Image Upload with Ajax and Codeigniter
I’m having a difficulty that is the following , I have a CRUD that the upload works right , when editing this CRUD I can edit all the data including the image upload all without problem , however if…
-
1
votes2
answers1233
viewsPass Json object array to Controller C# . NET
I need to do a post, and so far I’m trying to do by AJAX to send an object to the Controller, but I’m having trouble receiving the object. View/html: <select name="Servers" id="servers"…
-
1
votes2
answers50
viewsProblem with sending via URL ( GET)
Good morning friends, I have these buttons here: <button class="btn-excluir" data-id="1">Primeiro</button> <button class="btn-excluir" data-id="2">Segundo</button> <button…
-
1
votes1
answer299
viewsError: Undefined after an ajax request inside another
Follows the code: $("#l_linha").change(function(){ var linha = $(this).val(); var dados = $("#l_linha").serialize(); $.ajax({ type: 'POST', dataType: 'json', url: 'buscarPonto.php', async: true,…
-
1
votes2
answers335
viewsI wanted to put an Alert in my login screen PHP, JS, HTML, MYSQL
I wanted to put an Alert on my login screen, if the registration and password match what’s in the bank pass straight, if not, an Alert appeared or the boxes were red with the error with something…
-
1
votes1
answer488
viewsRequests POST AJAX ASP net MVC
Good afternoon, I’m with a small doubt, I’m making a POST request with AJAX on ASP net MVC and it works normal, but in firefox I get an error on the console However, this error does not appear on…
-
1
votes1
answer1151
viewsCreation of product registration with javascript
I am unable to register a book in an app that I am creating, this validation with ajax is correct? <b>var cadastrado = null;</b> <b> function ValidarLivro (){ var nome =…
-
1
votes2
answers379
viewsSelect2 in multiple fields with the same name
I am making an order registration page, where you can register several products. To register the products users have the options to Produto, quantidade, valor, subtotal, if you want to add one more…
-
1
votes1
answer38
viewsUser without duplication
Good guys, I have a screen to register usurer but I want to make that there is only one user with such registration and email, but I do not know where the program starts this part, someone of a…
-
1
votes0
answers1186
viewsPHP - file_get_contents('php://input') is the only way to read contenttype=application/json request?
I have the following Jquery Ajax method function postRefreshJson(_action, jsonModel) { $.ajax({ url: _action, method: 'POST', beforeSend: function (xhr) { $("body").css("cursor", "progress"); },…
-
1
votes1
answer84
viewsHTML + AJAX: Contact form
I have a contact form next to a google map. So far blz. But I’m catching in AJAX to make that when someone clicks in SEND appear an awesome font Gear and when successfully completed appear an…
-
1
votes3
answers73
viewsRequisicao ajax - query parameter
on a page I have this field filled with the value "SP" <input id="campo" value="SP"> In php I have parameter <?php echo $_POST['estado']; ?> to process this field via ajax I would use…
-
1
votes1
answer59
viewsCache problem with ajax(text files)
I made the ajax connection to introduce a file. txt in a div, but I modified the text and saved but the text is not changed (as if I hadn’t saved it) If you want to see the site where the text is…
-
1
votes1
answer246
viewsHow to update a page after Insert, update or delete with ajax without reflesh
I have the code on the exten page delete.php that makes the actions, HTML: <div class="modal fade" id="modalAddfoto" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"…
-
1
votes0
answers64
viewsIs the PHP session not renewed when using Ajax?
I have a scheduling page where every 30 seconds send (in background) an ajax request to know what times are still available, if there is an error I show a popup (bootstrap) with error information,…
-
1
votes1
answer115
viewsupload multiple images with jqueryform and ajax
Good afternoon, I’m trying to upload multiple images using jquery-form and ajax not to give Reload but is not passing to page via ajax by onchange and is not writing to the bank or uploading.…
-
1
votes1
answer53
viewsRecover Model List Passed by ajax through Formdata
I’m sending an image, along with a model that contains a list of integers. But I’m not recovering the moment you enter Action. I can recover the image, field1 and field2, while the field. HTML…
-
1
votes1
answer98
viewsDelete (rename) PHP figures with AJAX
I have a page (up.php) that shows the following: I want to do the following, by clicking Delete on any of them, show up a fa-Cog centered on the image and then remove it from there. What I have so…
-
1
votes1
answer471
viewsDELETE specific row from a table with PHP and AJAX
Hello! I have the following problem: A contact schedule that, one of the existing options is to DELETE a contact. It displays a TABLE with contacts, by clicking 'search'. In each row of the table…
-
1
votes2
answers281
viewsReload php page using ajax with updated data
I use the Ajax code to do a post and update a record within the database. After that I wanted to load the page again without reloading the page. It refers to a product delivery screen. When I click…
-
1
votes1
answer39
viewsCalculation of Ajax Dynamic Products
Good morning. I’m a novice programmer, and I’m developing a sales web app, where my system generates inputs dynamically for each product, multiplying the product price by quantity. But now I need…
-
1
votes1
answer3164
viewsERROR Uncaught Syntaxerror: Unexpected token < in JSON at position 0
I have the following JS script: jQuery(document).ready(function($) { $("#idSelect").change(function(event) { var valor = $(this).val(); //alert(valor); $.post( "ajaxSerie.php", { valorInput: valor…
-
1
votes1
answer249
viewsTrack AJAX requests in progress
I am working on a page where I have an update button, when clicking on it runs a series of AJAX requests to complete the data available on the screen (4 requests to be more exact). Should the user…
-
1
votes1
answer122
viewsImage upload with AJAX and PHP
People need a help to upload images with AJAX, PHP and Mysql It takes all the data right, even writes the image path in Mysql, but does not create the file in the destination folder, what I want is…
-
1
votes1
answer53
viewsGet parameter passed by POST with $.ajax
I’m having trouble getting the id passed by the ajax date (jquery), what happens is using $_POST['id'] or filter_input(INPUT_POST,'id') empty follow the ajax: $.ajax({ type:"POST", url:…
-
1
votes2
answers111
viewsConverting JSON to HTML via AJAX into Codeigniter
How do I use the JSON return in HTML? Follow the codes. Ajax function: $(document).ready(function(){ $.ajax({ url:"<?=base_url('pedido/listar');?>", dataType: "html", success: function(data) {…
-
1
votes1
answer413
viewsMVC PHP + AJAX can’t pass json_encode to ajax’s backup
Hello everyone and I thank you Have the form validation class where you take all form errors: // Validação final do cadastro public function validateFinalCadastro($arrVar) {…
-
1
votes3
answers367
viewsUse value returned via ajax with switch case on current page
Basically I’m trying to use value of a select returned via ajax with switch case. This switch case needs to be on the same form submission page using the select value for a specific case. My script…
-
1
votes1
answer379
viewsMVC - Intermediate php file in the View and Controller interface
Hey there, guys. I was reflecting on the existence of a relationship step of the structure of my project. The organization of my project is as follows: [1 ] When accessing the page the user can…
-
1
votes2
answers108
viewsChanging values of a table row by row
I have a little problem. I have a table with stock values, and I need to change these values as follows. The customer will insert a quantity that he wishes to manufacture of a certain product, and…
-
1
votes0
answers68
viewsSend empty date to ajax
I have in my form the following field: <input type="date" class="inputTextMedio" name="dataBatismo" id="dataBatismo"/> If chosen a date, it correctly sends the data to the ajax and write to…