Questions tagged as 'ajax'

2
answers

What is the difference between success and done?

Well I have a line of code in ajax which I do not know if it's better to use success or done I do not understand the difference between these terms but in the end the 2 do the same or I misunderstand the concept. $('#main for...
asked by 31.08.2017 / 17:14
5
answers

Load JSON file and store variable content

I have the following code: <script type="text/javascript"> $(document).ready(function(){ $("form.loader").on('submit',function(e){ e.preventDefault(); $.ajax({ url: "data.json",...
asked by 25.03.2017 / 07:31
1
answer

Error 404 on AJAX requests from Android after changing the server certificate

We are doing a hybrid app with Phonegap and jQuery Mobile that, through ajax requests, retrieves some data from an external server in JSON format and then treats them. We have never had any problems in iOS or Android. Since we updated the s...
asked by 18.12.2015 / 09:04
1
answer

Update a div with ajax jquery

Hello! I have this code, yes, I make many errors in the code, I'm new using AJAX and Javascript . var turno_actual = 0; function desplegarAlerta() { $(document).ready(function() { var refreshId = setInterval(function() { $('#tu...
asked by 21.08.2018 / 17:06
4
answers

Reuse ajax

I'm trying to reuse ajax to make it more mobile in my project. Put it in the following way waiting for an answer but no. function _ajax(params,uri,type){ $.ajax({ url: uri, type: type, dataType: 'json',...
asked by 30.05.2018 / 21:23
4
answers

Wait for a for each with ajax requests to finish to continue

I'm doing forEach in a array but this loop has an ajax request inside for each repetition and I need to wait until all the ajax are ready to continue ordering the array that is filled with these requests, this It's my code. var g...
asked by 13.09.2018 / 18:50
2
answers

Send POST to PHP through AJAX

I need that when I click on a button through POST I send a data to a PHP file where I make a query with that parameter that I receive to generate a graph. I have done it by means of a form, but an inconvenience arises when clicking on that butto...
asked by 21.09.2016 / 20:55
2
answers

How to get value from an input using jquery?

The following line: <a id="asociar-1500" style='color: #004881' href="#" title='Asociar al Proveedor' class="btn btn-danger"><input type="hidden" value = "true"></> It generates the following HTML: <a id="aosciar" cla...
asked by 06.05.2016 / 17:44
7
answers

Call functions with JavaScript parameters with Ajax $ ('Element') on ('click', func (param))

I need to pass a parameter to a JS function but:    when executing this code, call the function before clicking and also do not pass the parameter /*Este es el codigo AJAX al que quiero agregarle el parametro*/ $('#atribute').on('...
asked by 17.05.2018 / 15:05
4
answers

How to validate a field in html5 without reloading the page?

I have a form and in this I have two INPUTS , these are required so I use the HTML5 REQUIRED property but it only works if I put a BUTTON strong> and this makes my page recharge when doing submit but I do not send it directly but I use A...
asked by 10.02.2017 / 03:33