Questions tagged as 'ajax'

1
answer

Ajax + Php Pass Variable

How can I send a variable through Ajax and retrieve the value in PHP? <script type="text/javascript"> setInterval(function(){ $.ajax({ async: true, url: 'contalog.php', dataType: 'html', type: 'POST', cache: false, success: function(res...
asked by 11.11.2017 / 03:50
2
answers

JSON Treatment

Through JQUERY, I need to make a request via POST where I will get a JSON with a token. The JSON return I get after sending the POST is this: { "Token": "e27bb0a7-e65b-4cc3-a82e-7a2a3c26a248", "Codigo": 0 } My question...
asked by 14.11.2017 / 11:55
2
answers

Problem at the time of popular elements in the database

I was doing a chat project in php, with ajax, but my code does not insert anything into the database, but I have no idea what it is, and before they think I did not search, I already tried to bring the variable from js to php, but I could not, I...
asked by 26.01.2018 / 05:15
1
answer

Get HTML with jQuery by pressing button

I have a simple system that takes the HTML of a file and places it in a single dynamic index . Example: <a onclick="carregar('cartaonatal/natal.html');" href="#">Agradecimento</a> //chama a função function carregar(pagina){...
asked by 04.12.2017 / 02:33
2
answers

Ordered list PHP + AJAX

I've been having the following problem since yesterday, putting together an ordered list as I'll be fetching data in the database. I was suggested to do with ajax, I did with the help of a colleague of the forum to a certain extent. However, in...
asked by 18.10.2017 / 17:47
1
answer

Get data-value value that is generated dynamically

I need to get the value of a data-attr that is generated from an ajax request. The maximum I got was: $('.dataImposto').on('click', '.ImpostodeRenda', function(){ $(".ImpostodeRenda").html("ooi"); }); The problem is that this "TaxTim...
asked by 19.10.2017 / 21:19
1
answer

UPDATE not working with ajax?

The problem is this, I have an edit form whose data is sent by ajax . Here is the code: $("#edit_rua").click(function(){ var id = $(this).attr("data-id"); var nome = $("#nome_rua2").val(); var cod = $("#cod_rua").val(); $.ajax({...
asked by 30.11.2017 / 18:40
2
answers

Requesting ajax with append before opening modal

For some reason I'm not able to make this append work. function mostrarUploads(id) { $.ajax({ url: "/painel/mostrarUploads", async: false, method: 'POST', data: {_token: jQuery(".token").val(), id: id}, succes...
asked by 31.10.2017 / 19:26
1
answer

Do not clear screen data when giving error

Hello, I'm a bit lay with scripts yet. I ask for help, if at all possible. I have the following script : $.ajax({ type: "POST", url: "/PreVenda/GuardarPreVenda", data...
asked by 01.09.2017 / 17:40
1
answer

jQuery Autocomplete Uncaught TypeError: Can not read property 'length' of undefined [closed]

I'm using jQuery autocomplete to grab data from a JSON and show them in as suggestions on the form while typing. It turns out that JSON is not in the format expected by the plugin, so I decided to try to turn it into an array, but it's only in...
asked by 28.08.2017 / 04:52