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
-
2
votes2
answers79
views -
2
votes0
answers42
viewsHow to create generic function for different inputs
I own 3 inputs, where each should use the same autocomplete. However, each will carry out the consultation with their respective val(). How should I change the code below, so that this function…
-
2
votes1
answer57
viewsAjax sending _POST without maximum character
In this ajax the post sends more than 1000 characters: $.ajax({ url: 'inserir.php', type: 'POST', data: { inseason: document.getElementById('comment').value }, success: function(result) { alert('the…
-
2
votes1
answer1113
viewsWorking with the return result of an ajax request with jquery
I wonder if it is possible to compare a value returned from an Ajax function with an external variable using jquery. When I try to make the comparison I realize that the external variable is not…
-
2
votes2
answers3896
viewsCancel sending jQuery form
Good afternoon, I have a form and I want that when the button submit be clicked it does not reload the page for the post submission put the return false; in function submit of jQuery but it did not…
-
2
votes1
answer2640
viewsRun Ajax by passing credential information in Header
I need to make an ajax call by passing in Header the following information: Content-Type:application/json Cookie:authToken=valueXPTO (This information above I got from Postman) I need to do the same…
-
2
votes1
answer76
viewsCheckbox gets bugged MARK ALL -WITHDRAW SELECTION -Special case;
Hello guys my goal is to mark and uncheck checkboxs until then all right look at print: I press to select all and the script selects ALL I click to uncheck it unchecks ALL until then all right. The…
-
2
votes2
answers1446
viewsmaskMoney does not work on input within table
Here I call the mask wearing class $(function($){ $(".dinheiro").maskMoney(); }); in form inputs works normal, but in table does not work. function addProd(obj) { $('#add_prod').val(''); var id =…
-
2
votes2
answers157
viewsSend form data by e-mail
I downloaded the codes from a page on https://html5up.net/ to use as a temporary page while the site of an event I organize is not ready. The page has only one field where the person puts the email…
-
2
votes3
answers1645
viewsSearch Database By Selecting Select Options
good morning. I have a little problem I’m having trouble solving. The situation is as follows: I have 2 selects (State and city), I would like that when selecting a state the system did a search in…
-
2
votes2
answers179
viewsAjax return a results loop
I am making a financial system with ajax, both revenues and expenses have "descriptions" and to edit the information of a recipe I call her information but I have to pull the descriptions tbm.…
-
2
votes2
answers56
viewsAJAX request is running before click
js is along with html <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <form id="form">…
-
2
votes2
answers2304
viewsonclick() in elements generated through ajax?
I’m trying to use an event onclick in <li> generated through a form ajax(). I have the following code $(".option").click(function(){ alert(); var text = $(this).attr("href");…
-
2
votes2
answers59
viewsSet loading display time
I have the following code that I use to send the form data to the PHP file. function loginRequest() { // Declaração de Variáveis var usuario = document.getElementById("txtusuario").value; var senha…
-
2
votes1
answer2714
viewsAjax Request with Laravel 5.4
I’m trying to perform an example of requisition Ajax with the Laravel 5.4. The example for testing is simple, just enter a numerical value in a field input=text in my View and leaves the field to…
-
2
votes3
answers1161
viewsHow to send an object array type variable via AJAX?
I have the following object: var pessoas = []; pessoas = { nome: "julio", sobrenome: "Henrique", idade: 18, amigos : ["Pedro", "João", "Isabella"] } I send the friends array via ajax like this:…
-
2
votes1
answer380
viewsHeader php Location is inserting file instead of redirecting
When I log in to my form, after checking if the user is valid there should be redirection to the home page. But when using header('location: home.php'); is being inserted the contents of the…
-
2
votes1
answer502
viewsLike locking <tr> after clicking once
I have several table row and when click on one <tr> run this script: $(function(){ $('tr').click(function(){ $("tr").prop("disabled", true); var id = $(this).attr('id');…
-
2
votes1
answer780
viewsSending variables in Ajax to PHP
Using php I do a BD search and send the data to AJAX via JSON: echo json_encode(array('sucesso'=>true, 'mensagem'=>'Dados inseridos com sucesso','idservico'=>$idServico)); In AJAX I…
-
2
votes1
answer2816
viewsUsing reCAPTCHA with jQuery (ajax) and PHP
Hello, Guys! It’s been 4 days since I programmed using jQuery :) I made a form using ajax and PHP, worked perfectly! But... the need to implement reCAPTCHA has arisen. I don’t know where to start, I…
-
2
votes2
answers206
views -
2
votes1
answer2783
viewsUpload ajax jquery php
I need the image upload to be done with ajax/jquery, following this structure: Form: <form> <input type="text" name="seu_nome" /> <input type="text" name="sua_senha" /> <input…
-
2
votes2
answers898
viewsUpdate with ajax in Laravel
I have a project in Laravel and I want to make sure that when the user type something in the text field, when taking the focus of the field he makes a request ajax to the server to update the…
-
2
votes1
answer733
viewsValidate CPF with Ajax and then submit the form
Good night, you guys. I am in need of help, I am trying to do a validation and then send the fomulário, what I need basically is: When the user enters the CPF in the form, I want to do a check in…
-
2
votes2
answers1042
viewsButton does not direct to another page
I have a button that when clicked on it, the localStorage takes his ID, then plays the id to the other page, but when I click on the button it is not directing to the other page, only changing the…
-
2
votes1
answer51
viewsAjax return error - Json format with PHP
Good evening. I am unable to find the error. I intend to build a list as I enter the date in the input date. Below is html: <div class="form-group"> <label…
-
2
votes4
answers3601
viewsCheck if input file is with file or not
I need to do a validation in the field file, in case it has no attachment show me a message on the screen forcing to attach, I tried some alternatives and could not. <div class="form-group"…
-
2
votes1
answer84
viewsTable populated via bank coming with empty field
I’m populating a table via a select I have in my file selectUser.php. selectUser.php: <?php require "conexaoBD.php"; $nome = $_GET["nome"]; try { $pdo = new PDO($server, $dbuser, $dbpass); $sql =…
-
2
votes2
answers54
viewsReload Automatico without being precise
I have a question! I have a voting system, which has a page that shows the results live from the vote, this page uses to show the charts Google Charts and background has an ajax code that runs every…
-
2
votes0
answers71
viewsRefresh a page based on chat information
I have 2 sites, the first one is www.chat.com.br and the second is www.view.com.br. My goal is: 1 - Collect chat alerts 2 - Update the site view constantememte with the alerts collected from the…
-
2
votes2
answers86
viewsAjax does not work when it comes from a form select
When the #sectionChooser comes from Ajax or does not work select #neighborhoods to put the #street, where would be the problem? Html <div class="col-sm-6"> <label…
-
2
votes2
answers1045
viewsChange input color according to value
Good afternoon Amigos I have an input with the name of MARGIN, where a value is displayed according to some calculations that are made... I need the input to change the color to red if this value is…
-
2
votes2
answers67
viewsHow to execute a function whose name was passed as a parameter of another function, à la callback?
I created this function in order to abstract the calls $.ajax() to be performed at various different times. One of its parameters is the name of one of the functions I would like to be performed in…
-
2
votes1
answer1545
viewsPosition focus in a field of a modal window - Javascript and Asp.net MVC
I have a view model that has a block that opens modal windows for CRUD actions. I have 4 partial viewls: create, delete, Details and Edit ... All have the Description (Description) field in common.…
-
2
votes1
answer66
viewsMicrosoft Edge passing strange characters in AJAX call
I have an Ajax call on a web system, where you specify a date of dismissal, and fire an employee on that date: data is the parameter that comes with the Ajax call. When I test in Chrome or any other…
jquery ajax google-chrome character-encoding microsoft-edgeasked 6 years, 6 months ago Artur Trapp 5,175 -
2
votes1
answer28
viewsAjax, HJS and Mustache
I don’t like writing HTML in Ajax, like this... var orderTemplate = "" + "<li data-id='{{_id}}'" + "<p><strong>Nome:</strong> <span class='noedit nome'>{{ nome…
-
2
votes0
answers96
viewsHow to get data from json to php
I have the following webservice script, I can connect normally with the external host (code: 200) But in echo Responsebody nothing appears. How to show the obtained data? <?php $USER_NAME ="abc";…
-
2
votes5
answers889
viewsAutomatically delete inputs later
I have this code to send data by POST method, but then does not clean inputs:: <script type="text/javascript"> $(".btn_contact").click(function () { $.ajax({ type: "POST", url: "./inserir",…
-
2
votes1
answer47
viewsGet json through ajax/javascript
I have a webservice developed in Java that is responsible for returning all the compositions of a particular fabric/piece (textile area). The webservice is first of all returning the existing…
-
2
votes1
answer197
viewspass value of select with array by ajax
I need to pass the information of a select array through ajax but I’m not getting it. My form: <form method="post" id="form1"> <table width="100%" border="0" cellspacing="0" cellpadding="0"…
-
2
votes1
answer224
viewsPass a button id inside a while (in php) to a java script code and print the id inside a modal
I have two buttons in a table that sits inside a while (in php code) and I have a modal outside that while structure. My question is how can I get the individual id inside my table that is inside…
-
2
votes1
answer109
viewshow to concatenate an object into asynchronous function?
Hello I am developing a site to train a little js, but I came across the following situation: I have a javascript object that I created to facilitate the Ajax queries, but when I am making the…
-
2
votes1
answer245
viewsUpdate modal when deleting record from table - MVC
I have this modal, and I have the function to exclude, I need the data to be deleted and updated, without closing the modal. Follow the code as follows: This is the modal: <div class="modal fade"…
-
2
votes1
answer55
viewsSending of ZEND email
A client wants me to create a form that sends data to a link, from what I saw, is using "zend", I never got to use this framework and I’m a bit bewildered. That was his message: Para realizar a…
-
2
votes2
answers57
viewsManipulating data from Ajax
Whoa, guys. I have a page that receives JSON data from an Ajax request from so long, in this format: { "status":"success", "total":4, "0":{ "id_user":"11", "posicao":0, "nick":"Usuario",…
-
2
votes2
answers161
viewsHow to give Submit in the data of a dynamically generated form?
<div class="form" id="dynamicDiv"> <p> <div id="principal"> <form method="POST" action='enviaMform.php' id="enviaMform"> <div class="container"> <label…
-
2
votes1
answer47
viewsLoad data without refersh
I have a form passing the data by GET to an API, the method put empty to load on the same page, when they return the data I put inside a div to display them, but I need you to do this without…
-
2
votes1
answer142
viewsSynchronize 3 Select with Loading + Jquery/ Ajax
Hello, good day. I am with my app here on the following question. have the page index.html, on this page I have a <div> so that the loading according to the code below: <div id="loader"…
-
2
votes2
answers933
viewsI wanted to show an Alert after a form has been sent, PHP, JAVASCRIPT, HTML, AJAX
I’m in trouble, where my form is being sent to the bank but in Alert appears alert("erro ao enviar formulário");. <?php if(!empty($_FILES['uploaded_file'])){ $username = 'root'; $password = '';…
-
2
votes1
answer839
viewsHow to call a modal in the View from the Controller Actionresult
To call a modal from the Controller’s Actionresult, after the user clicks the button to register? The controller is currently redirecting to the index page after the user registers. I want instead…