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
votes1
answer22
viewsError after View is called
I have a login screen with the following call when the user clicka on the button "login" $(document).ready(function(){ $("#formLogin").on('submit', function (e) { e.preventDefault(); var form =…
-
1
votes1
answer435
viewsSave file to Mysql database using ajax and php function
I need to save files that I can already select in a modal using a js function. Below follows the modal html <div class="modal fade" id="modal_arquivo"> <div class="modal-dialog"> <div…
-
1
votes3
answers105
viewsHelp to understand localStorage.js
I would like a help to enter the localStorage in javascript. Objective: Make a function to save information in the input identical to wordpress, example: In the third print is what I want, if he…
-
1
votes0
answers111
viewsConsumption webservice with error: Unsupported content type
My first question is: I can call the Webservice directly via JQUERY / AJAX or I need to have something in PHP or some other back-end language to accomplish integration? If possible only with JQUERY…
-
1
votes1
answer169
viewsEmpty textarea post with ajax jquery and formdata
I have a form that uses Ajax to do the POST in PHP and insert in the database to get the data using Formdata but the textarea inserts empty in the database. <script type="text/javascript">…
-
1
votes0
answers51
viewsTruncating data when entering into the database
The system is on a common host with the following config: Apache 2.4.25 PHP 5.4.45 Mysql 5.5.58-cll It is intended for O.S. control and each user has a login with his password. During the…
-
1
votes1
answer47
viewsAjax autocomplete in Entity Framework
I have following HTML code: <input id="pesquisaEstilo" name="pesquisa" type="text" placeholder="Destrito, Concelho" /> <input type="submit" value="Pesquisar" id="botaoPesquisar"/> I want…
-
1
votes1
answer98
viewsGet INT as INT and not as string - Codeigniter - Ajax
I have the following tabela, controller and model, I want to get what it is int as int, and not string. Note that when the item is recovered, the field int is in quotes. How do I recover the data…
-
1
votes1
answer479
viewsAccountant with Ajax
Is there any way to create a counter type with Ajax? I have the code below, that when we perform a Submit in a form, it calls this ajax, and executes the predefined processes. I wonder if after 3…
-
1
votes1
answer97
viewsUpdate database with AJAX Switche button (Materialize)
I’m using the Materialize Framework, in it I have a button (Switche) that switches between ON and OFF, just in html, I wanted to insert this into a Mysql database, all in real time, by pressing the…
-
1
votes2
answers273
viewsError making API requests using Axios and Vue-Resource
It was consuming data from an API using XHR and was working very well, but there were some changes to the project and the need to use Vue arose. I tried to make the same requests using Axios and…
-
1
votes2
answers2588
viewsC# Call Controller method Asp.Net MVC5 with Ajax
Hello, I have a method called GetData() in my Homecontroller that returns a JSON, I would like to pass the data to my View, but it always comes empty, I’m starting as a developer, and I’m already a…
-
1
votes0
answers63
viewsUpload File, one at a time
I have a doubt about how to send one file at a time after the previous one is complete (I have a multiple input) but sending one at a time but (if the files are large sends both at the same time and…
-
1
votes3
answers1183
viewsAjax only returns if I put an "echo" instead of "Return" in php
I am building an application using ajax (jquery) and php, when returning a json by php, jquery only takes the value if I have given an ECHO, if I return json through Return (I am using a function in…
-
1
votes2
answers691
viewsSelect without refresh page
I use a select to access multiple sites example: city-1, city-2, city-3, when I select the city the url is: www.meusite.com.br/city-1. There I tried to use ajax to get the URL fixed on:…
-
1
votes2
answers53
viewsEnable button when last request is executed successfully
Personal I am wanting to enable a button only when the last post request via Ajax is executed successfully. I have a table with several records with their respective information and ids. By clicking…
-
1
votes1
answer64
viewsAjax taking only the first id
Hello, I’m updating a list with arrays and php, passing two presence parameters(ckeckbox) that returns true or false and id in Hidden, but id does not proceed in the loop getting the first id in the…
-
1
votes1
answer129
viewsCapture a record in a table and then insert it into the database
I’m developing a service order registration form for a workshop. I need the registered service to be linked to an already registered customer. For this I created a search form where the user can…
-
1
votes1
answer601
viewsUpdate DIV with Ajax Asp.Net C#
I’m setting up a Dashboard for tracking tickets, in it there are basically two things, 4 fields and 1 chart. I would like to update them periodically, tried with <meta http-equiv="refresh"…
-
1
votes1
answer294
viewsController receiving parameter array as null
I’m making an AJAX request, but I can’t pass array... My controller is like this: [Route("imoveis/BuscaDados/Json/Listas/ListaQuartos")] public JsonResult ListaQuartos(int idEstado, int idCidade,…
-
1
votes1
answer22
viewsList by jquery and Submit action
I have this script, that when selecting a state, it loads the municipalities that are working, but if I try to save by an action Submit it shows the error. But what the user chose in the…
-
1
votes1
answer534
viewsRecover Input File to Pass as Date in AJAX
I am developing an application in which, for aesthetic reasons I needed to recreate some elements to be able to properly customize each especially <select> and <option>. So I need to…
-
1
votes1
answer57
viewsUnnecessary exclusion
I have a table filled with codes: 1 2 3 When I click the delete record 1 button, it asks a question: "Do you want to delete the record?" I click no. I do the same for 2 But on 3, I click "yes" The…
-
1
votes1
answer395
viewsWrite textarea line break in database
I have a <textarea class="form-control" id="informacoes" name="informacoes" rows="3" placeholder="descreva aqui..."></textarea> where the user can enter various information. The…
-
1
votes1
answer92
viewsDifficulty Loading Input Data via Ajax
I’m trying to load data via Ajax by typing a code and clicking TAB it automatically searches the BD and prints in form inputs. I ran a test on console.log(data) and the data is being returned but…
-
1
votes1
answer428
viewsAjax returning Undefined
I put an Else in my php function and it’s falling into Else, but I have parameters to get from the url. I have the following code in php: $utm_source = $_REQUEST['utm_source']; $utm_campaign =…
-
1
votes2
answers41
viewsHow to make connection alert?
good i am beginner in ajax and wanted to know how I can do a check of connection to the internet, and display message on the screen whether or not you have an active connection to the internet (I…
-
1
votes2
answers648
viewsReload main script when completing ajax request
I am developing an application in which I have some "views" that are loaded in my <section id="view"> through ajax. The view loads normally, but functions that have been programmed with jQuery…
-
1
votes1
answer489
viewsDynamically recover all GET from URL
I am dynamically loading my views with ajax using: view = getUrlParameter('view') ? getUrlParameter('view') : window.location.href+="?view=newusers"; $.ajax({ method: "post", url:…
-
1
votes1
answer218
viewsMethodnotallowedhttpexception($others) Laravel Send form via Ajax
I have a simple form and I am sending it to the controller by Ajax, but my problem is that after clicking the Submit button it does not call the Ajax request in my Jquery and already forwards…
-
1
votes1
answer216
viewsHow to concatenate a javascript object to a post form?
I have an object JSON that I built at runtime, I need it sent to my servlet, along with the other form fields, via post, how do I do this? I searched a lot but nothing worked. function createJSON()…
-
1
votes0
answers36
viewsDatepicker Beforeshowday using web api
Good evening, I need to make a calendar (using datepicker from jquery ui), where the dates listed in the database, need to appear highlighted. But I have no idea how to do it. I am consuming a…
-
1
votes1
answer55
viewsInsert various products + a rental date for each
I am with a tremendous doubt and without any north of how to solve. I need to select products to rent to a client and inform a date of the rental time of the same, but I do not know how to present…
-
1
votes2
answers880
viewsJquery Ajax - Request problems every x seconds
I am developing a web application that I use ajax to request from time to time to find out if there has been a new update, but my code does not work perfectly. I’m new to jquery and I’m having…
-
1
votes1
answer1732
viewsReturn Datetime Json /Date(1519339100637)/
Good evening, I’m working with Ajax to return a json containing a data in the format Datetime but I’m getting in string format /Date(1519339100637)/. How can I convert to date and time format…
-
1
votes2
answers278
views -
1
votes1
answer40
viewsHelp to query a single database user’s information with JSON
This is the code that works with the img.php file function loadContato(){ var location = $('.result_File'); var item = ""; $.getJSON("img.php", function(dado){ item += '<p>' + dado[0].username…
-
1
votes0
answers242
viewsWhat is this net::ERR_SPDY_PROTOCOL_ERROR error while uploading?
I’m using Google Chrome to run some tests on an application that I’m servicing. I am specifically using Ajax to upload a ZIP file. When I do the tests on my machine locally, the upload usually…
-
1
votes1
answer83
viewsMongodb Objectid returning [Object Object] in Ajax
In a query I do in Mongodb using Ajax and PHP, when I manipulate Objectid already in javascript, it returns me as [Object Object]. How do I use it as a string? It follows code $.ajax() $.ajax({ url:…
-
1
votes1
answer395
viewsJSON States and Cities Select ZIP Problem
Good afternoon, I’m having a problem with my select of states and cities. When I type one ZIP CODE it fills in the fields automatically, I can already fill in the State even though he is a select…
-
1
votes1
answer329
viewsAjax in MVC - Select
I’m having a problem loading the fields select in my project. Mine Forms are all done with Razor and only the select’s(combobox) I charge by ajax. Problem: When I start the form the ajax event to…
-
1
votes1
answer578
viewsReturn Json with special characters
I am performing a query in the database (Php, Mysql and Ajax), the return of this query is a Json, however all accents are coming with special characters, I put a log to see the result. Below…
-
1
votes1
answer245
viewsAjax with html checkbox
I’m having trouble getting the value of the checkbox selected, php is taking the value of all checkbox including those that were not selected. How would Ajax pass PHP only to those selected? HTML…
-
1
votes1
answer67
viewsHow to create a jquery object and insert it into mongodb via ajax?
I have the following structure in html: <form id="titulo"> <input type="text" name="nome"> </form> <form id="turno1"> <div class="linha"> <input type="text"…
-
1
votes0
answers209
viewsAsynchronous Request Jquery+Ajax+PHP returns empty object
I need to check if the cnpj is already registered in the database and return to the client if it already exists in the database, the problem that I do not want to happen the refresh of the page so…
-
1
votes1
answer836
viewsAjax does not work with Modal Bootstrap
Hello, I have the following code, where the Modal Bootstrap opens from a BD search when I click on an item from the returned list: <input type="text" name="pesquisa" id="pesquisa"> <table…
-
1
votes0
answers671
viewsHow to change the value of a php variable using Javascript or Ajax?
Contextualization When registering a project by default (default) Status of Documentation is pending as a result of this configuration project tabs are not visible. If the user changes the Status of…
-
1
votes0
answers41
viewsAjax request error on Node
I have a view that contains a login form. The request is sent via ajax, but the data is not being captured and req.body in the back end is empty. Even if I create a string and switch to Node,…
-
1
votes1
answer1173
viewsDisplay success message after registration is completed via AJAX
I want to display a message like "loading" while processing the registration and another with "Registration completed", this is my AJAX code $.ajax({ type: "POST", url:…
-
1
votes1
answer31
viewshow do I insert all returned rows into the bank via serialize in ajax
I’m making a home page.php that brings me information a second page Function.php via ajax until then everything normal but in this return brings a table with the database information and a button to…