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
answer290
viewsjQuery . on('change', Function() {} does not work on select cloned
EDIT: I have an application that uses information from one select to another select using the ajax change function as below: $(document).ready(function(){ $('.empresa').change(function(){…
-
-1
votes1
answer36
viewsFill table with database data via Ajax
I am very confused. I am creating an application with PHP and PDO. I have a page where there is a table with my database data. At first, it already makes the query in the bank and stores the result…
-
-1
votes1
answer21
viewsKeep Scroll at [last position after an AJAX request?
I am having difficulties in performing an activity that is to keep the scroll in the LAST position before the AJAX request. //antes da requisição var scrollPosition = $('.cart').scrollTop(); ==>…
-
-1
votes1
answer50
viewsHow to take the value of php Session and in the select field mark as Selected through ajax?
Hi, anyone who can help me would be great. It’s been a few days since I broke my head in the code. I have a form (which gives POST on the page itself) with select fields of cities and neighborhoods.…
-
-1
votes1
answer17
viewsValidate input with ajax populated values
Oops! One more than taking a beating. I have an input that is auto populated via ajax, as you type the search ajax and go listing results in <li> in a <div> below the input. Type the…
-
-1
votes1
answer36
viewsSend 2 Array with json_encode with While PHP command
I don’t know how else to explain it but come on. I have a game with . js fighting system the current idea is to add CD (Reload Time) in Skills. When I use another Skill the previous one comes out of…
-
-1
votes1
answer58
viewsWhy are strings that contain [ or ] coming from $_POST transformed into an array?
I am sending data from a textarea via AJAX to PHP by the POST. method in this textarea contains some square brackets. Well, when the text of the textarea arrives in the POST, it automatically…
-
-1
votes1
answer55
viewsQuestions and answers using Ajax
I’m making a <form> that returns an interaction if the answer is wrong. The idea is: if the user selects the right answer, the <button> change the color to green and/or red for wrong.…
-
-1
votes0
answers34
viewsRecover database record and display on user screen with Laravel 8
I’m a beginner and I’m struggling to get back the database data and display on screen. I have the following scenario: I have an input field to put the numbers of a CPF that has already registered in…
-
-1
votes0
answers31
viewsHow to make a button list data using two select
Hello, I’m doing a project with dynamic selects, I managed to make the selects take the database information, but I wanted to create a button so when it is clicked return me the data of this query:…
-
-1
votes0
answers25
viewsHow to pass SELECT output to JSON?
I need to take the result of a query in the Database (made by a select), and insert it into a JSON file to receive the JSON file in Javascript and manipulate the data. I tried something like:…
-
-1
votes0
answers15
viewsHow to send two $.ajax requests at the same time to the php file using a function as a parameter in AJAX date just by making a request?
I am having trouble sending the data via AJAX at the same click event. PHP does not identify the title, only the photos that were sent. In SQL, the title of the product is not registered, only the…
-
-2
votes2
answers314
viewsReturn a class in jQuery
I have these Hidden fields in my cshtml: <input type="hidden" id="txtGeoTo" name="txtGeoTo" /> <input type="hidden" id="txtDateStart" name="txtDateStart" /> <input type="hidden"…
-
-2
votes1
answer187
viewsUsing Javascript with AJAX
I have a form on a JSP page. When the customer enters the CPF, via AJAX, I take the CPF I make a query in the bank, if she has already registered. I take all the data from it, and fill in the fields…
-
-2
votes2
answers97
viewsDisplay a DIV when you see that it has a background color
I need to know how to display a DIV only if it has a BACKGROUND color selected, if it does not have it, it remains hidden. Because I have a color palette in CSS and when I select a color, the hidden…
-
-2
votes1
answer98
viewsRefining Post-search Results (PHP -AJAX)
I would like to know how to make a vertical menu with a form for updating data without refreshing and without having to press Ubmit. Just click on the option you want to change. Like if I did a…
-
-2
votes1
answer145
viewsHow to step a database variable that is in php for javascript?
I have a program that has coordinates in the database, picking up these coordinates I would pass to another page (javascript) that would calculate the route and show a map on the screen of the…
-
-2
votes2
answers22
viewsDoubt about ajax (javascript)
to with a doubt, have to send from index to api (using ajax) more than one value?. I am accused of using the code like this. But I don’t know how to send the value of 2 different inputs.…
-
-2
votes2
answers355
viewsLoad JS before rendering the page
Good afternoon, I have a code for php where it has a list of publications and it uses the Ajax, but unfortunately it is being the last to be downloaded by the page. After all the files you have…
-
-2
votes2
answers153
viewsAssign returned Success value to a variable
I have the following requisition ajax where it returns the value in success: function novasMensagens(Alerta) { var retorno = Alerta > 0 ? Alerta : ""; $.ajax({ type: 'GET', url : './fetchbusca',…
-
-2
votes1
answer81
viewsHow to pass via POST Javascript information to PHP
I have a select which is assembled via database query. <?php $tl_rel = ""; $arg = array("select"=>"*","tabela"=>"TAB_RELATORIOS","where"=>"where login='{$_SESSION['login']}'"); $obj_rel…
-
-2
votes1
answer302
viewsOnbeforeunload on Google Core, any hiccups?
I need to use onbeforeunload for my control of users on my system, IE is working perfectly, but in Chrome it does not work, I need that when closing Chrome it redirects to the page verifies.php that…
-
-2
votes1
answer464
viewsReturn 2 date type in ajax
I have an ajax that returns me a date on onSelect of a datepicker, so far so good.. but I need the consultation to return me also the ID of a select (dentists) how can I make these 2 returns on a…
-
-2
votes1
answer77
viewsPHP being commented within JS
The code is this: success: function (result) { var tbody = $('tbody'); tbody.html(''); $.each(result, function(k, value) { search += "<tr class='tagtr'>"; search += "<td>" +…
-
-2
votes2
answers1554
viewsChat with PHP, AJAX and Mysql
Good community. I am working on this chat system, very simple. I don’t understand why I don’t get messages in real time. I can only receive messages from another user if you close and open the div…
-
-2
votes1
answer189
viewsLoad from Database only when all is loaded
In the Portfolio section, when pressing + load, you can see that first loads the block and then the images with a delay of 1 second. SEE ON SITE: somospixel.com/test I only want it to load when the…
-
-2
votes1
answer140
viewsJquery does not load effect obtained through a service
I will try to present my problem as best I can. I have a page made in HTML and I have a service made in Java that returns me an html. In this my html page I use an ajax function to load the data of…
-
-2
votes1
answer56
viewsPHP and AJAX, what am I doing wrong?
Friends, I am doing an AJAX with PHP but the record is going empty. What I am doing wrong? function newColor() { var nome = document.getElementById("descricao_cor").value; var cor =…
-
-2
votes1
answer75
viewsAJAX request for PHP page is not sent
Good night , Guys, my page 'l_os' lists and changes all items on another page correctly. Only that I am changing all pages to display and change through a single page to index.Ai enters the ajax ,…
-
-2
votes1
answer162
viewsChange the field value dynamically
Hello, I would like help with my code, I wanted when the user clicked on the field with the magnifying glass: <a class="blue" href="#"> <i class="ace-icon fa fa-search-plus…
-
-2
votes1
answer85
viewsWhy is my ajax request not working?
<script type="text/javascript"> $('#enviar').click(function(){ $.ajax({ type: 'post', data: '', …
-
-2
votes1
answer348
viewsAjax does not work in Internet explorer 6
<html> <head> <meta charset="utf-8"> <title>AJAX, JSON E PHP</title> <script type="text/javascript" charset="utf-8"></script> </head> <body>…
-
-2
votes2
answers66
viewsHelp with Jquery + Php
I have a form that is loaded through a comic while. the structure is this: <form id="formulario" name="formulario" action="javascript:Func()" method="post"> <div id="div_prod"> <?php…
-
-2
votes1
answer1056
viewsFill two inputs automatically, using data from an input and select searched in database
I have a problem, I was developing in PHP that I already have some knowledge. But a client asked me to make a system for him and I took something that was kind of unusual for me. The client needs…
-
-2
votes1
answer155
viewsAdd and edit AJAX element
Good, I want to edit a trafter creating it and acquired by AJAX. When I click on create 'Tag': $('#confirmCreateBrand').click(function(){ brand = $('#createbrand_name').val(); advertiser =…
-
-2
votes1
answer125
viewsDifficulty checking php data with mysql
I’m trying to check the bank to know if you already have a user with registered email typed by hmtl, I did this php script, but the execution always stops at the first if even if the email typed is…
-
-2
votes3
answers35
viewsAjax not sending request
I can’t see where the mistake is. Accuse me of this mistake $("#btnSalvarArquivo").on('click', function () { var EspecieArquivo =…
-
-2
votes1
answer168
viewsmake a search between two data php html mysql
I need help with a search between two dates.... I am entering an initial date and a final , but I need to return the result on another page .... however my return is always from the customer…
-
-2
votes1
answer9093
viewsHow to resolve Syntaxerror error: Unexpected token E in JSON at position 1
I’m trying to make a simple registration but I’m getting an error message: Syntaxerror: Unexpected token E in JSON at position 1 I could not solve, the script is thus configured:…
-
-2
votes1
answer234
viewsVue does not work with ajax
I’m new to Vue and I made a simple code: var appCtrlUsuario = new Vue({ el: '#appCtrlUsuario', data: { Nome: '', Email: '', Cond: '', Type: [{ id: 1, name: 'Morador' }, { id: 2, name: 'Síndico -…
-
-2
votes1
answer22
viewsajax contact form conflict
Personal I am with a problem I have two contact fomularios in ajax and the one this giving conflict I know the error this in this line $('form input[type="submit"]').bind('click', function (event) {…
-
-2
votes1
answer85
viewsMessage request in file . php
I created an email form, it’s functional. I just wish I knew how to return the message echo('Email enviado com sucesso'). Inside my html index. For example: <form method="POST"…
-
-2
votes1
answer168
viewsHow to separate and identify objects within an Ajax request, with data coming from Servlet via Json?
How do I separate the objects inside the Ajax? The Servlet sends a list of objects to Ajax, but I can’t separate them inside the Ajax to be able to pick up an attribute from a specific object, for…
-
-2
votes1
answer122
viewsWait for a function to finish running another
I have on my page a form with a button called "Approve" at the end, which when triggered opens a container/field to be filled before approval, however, I want before opening this container/field,…
-
-2
votes1
answer67
viewspreventDefault does not work with onclick function on button
preventDefault does not work follow the code: function updateCliente(e) { var url2 = "con_cliente.php" var url = "update/update_cli.php"; if (confirm('Tem certeza que quer cadastrar o cliente?')){…
-
-2
votes1
answer162
viewsfill table with javascript and ajax!
I’m trying to fill a table using javascript with the data coming from an ajax model. of that fortress : $("#md").on("click", function() { if (FA.checked) { $("div.hidden").css('display', 'block');…
-
-2
votes2
answers111
viewsHow to send data to PHP in real time?
Talk personal, all right? I’m trying to make a system that calculates budgets depending on the product and its characteristics. I am using the following code to rescue the data from the database…
-
-2
votes1
answer99
viewsPlace a bar at the end of the url (or before the query)
I implemented this script, language exchange (or unit exchange, in this case): /*Aqui ele coleta a seleção*/ $('#unidade').on('change', function() { document.getElementById('form_unidade').submit();…
-
-2
votes1
answer298
viewsGet php return in Ajax
I need to take the value of an ajax, after a php fetchAll I am doing a function to calculate the freight of a commodity based on a database of deliveries that I own, already with a predefined value.…
-
-2
votes1
answer29
viewsPassing a body value from a modal to a PHP function
Good night, I have the following problem, I have a modal within a system, what I need to do and I’m not getting is to pass the values I read in javascript to a PHP function for in case I "delete"…