Questions tagged as 'ajax'

1
answer

Error accessing JSON with Ajax jquery

I'm getting a JSON that I created with PHP as described below, but when I try to access the properties of that JSON it always returns me undefined . I made these test files there to demonstrate how I'm doing. If I give a console....
asked by 22.02.2018 / 21:04
2
answers

Add loader in ajax

How can I add a loader to my ajax request? $(document).on('click', '#reg-discagem input[type="submit"]', function(e){ e.preventDefault(); var form = $('#reg-discagem'); $.ajax({ url: 'EnviarPedid...
asked by 01.02.2018 / 20:35
2
answers

Upload csv file with ajax, json, php and mysql

I'm trying to make a import of a file csv to MySQL dealing with errors with JSon but I can not, even with a basic test I can not return the message, it always falls in else if . This is the form: &l...
asked by 06.02.2018 / 17:18
1
answer

transport data to another page

I am doing the frontend of a login system and am using pure javascript for this. I can already log in to the API and in the browser console to receive the data of the user that is logging on. This is my AJAX: function loga() { console.log("E...
asked by 16.01.2018 / 19:34
1
answer

How to perform ajax but not update content of the div so add?

I have <div> where the return of the function ajax is returned, but it updates itself, I want to know if it has the function ajax and instead of updating it to bring the result leaving the old result, it is possible?...
asked by 08.01.2018 / 19:47
1
answer

Django + AJAX - POST 404 (Not Found)

I'm trying to implement a system of likes in a Django + AJAX application, but when trying to do the operation in question I'm getting the following error in the browser console: POST http://localhost:8000/forum/like/ 404 (Not Found) . I do...
asked by 10.01.2018 / 15:07
1
answer

'Can not set headers after they are sent.' Express.js

I'm trying to send the 'name' variable to the client side, but it's only working when I run a respons.end() when I use two, returns this error: > 'Can't set headers after they are sent.' Server router.get('/:eventnick', func...
asked by 14.01.2018 / 18:26
1
answer

How to generate query and add new input?

I have a field input of type date I want every time I click and view it, it generates a select with the query of the date that I set and generate a new input to add another date and so on. > My code so far: HTML FORM <for...
asked by 29.01.2018 / 21:28
1
answer

How to upload an image using jquery / ajax?

I am sending the following data to save a form: function editaFeira(id, descricao){ if (confirm("Confirma a alteração de " + descricao + "?")) { $.ajax({ type: "POST", url: "functions/editarFeira.php", data: {id: id, d...
asked by 20.01.2018 / 15:12
1
answer

I have a problem validating a contact form

HTML code: <section class="contato"> <div class="parallax-targetaf section-0" data-parallax="scroll" data-image-src="img/4.jpeg"> <div class="container cf"> <div class="containerrr"> <form id="...
asked by 06.01.2018 / 03:49