Questions tagged as 'ajax'

2
answers

How to make a tutorial of first access to the site?

I would like to create a First Access Tutorial for my Site , those that show what each field in the site means, need a hint how to do it or if there is any Framework for this type of interaction with the user, I did some research and did not fi...
asked by 08.03.2016 / 16:36
2
answers

dynamic url in ajax

How do I get Ajax to get the current URL? For in it are the values that go to php. If I do it works like this jQuery.ajax({ url: "http://localhost/jogoteocratico/consulta.php?dificuldade=1&rodada=1", type: "GET", dataType: 'j...
asked by 28.01.2017 / 19:51
2
answers

How to pass value from javascript to AJAX

I have a javascript function that has AJAX code inside it. I want to pass the values from javascript to AJAX, follow the code: function validarCamposComprar() { var campoNomeEmpresa = document.getElementById('fTxtCadastroNomeEmpresa')...
asked by 02.07.2015 / 20:48
3
answers

How to modify form fields if user input is invalid when compared to regular expression with JQuery

Well, I have the following form: <!DOCTYPE html> <html> <body> <form action="enviar.php" method="post" accept-charset="utf-8"> <label>Nome<br> <input type="text" pattern="^[a-zA-Zà-úÀ-Ú ]{2,30}$" aut...
asked by 27.08.2014 / 21:09
2
answers

Show items as selected by a select (HTML) [closed]

Good afternoon! I have a database with two tables, products and menus, the two tables are indexed through the CdCardapio field. I created a html select element that contains all the registered menus, so that when selected, for example, the "B...
asked by 15.09.2015 / 20:35
2
answers

Ajax request to return error 403 Forbidden?

I have the following code on my site. setInterval(function(){ var id = $("#id_radio").val(); var id_glob; $.ajax({ type: "POST", url: "ajax/update_radio.php", data: "id="+id, success:function(e){...
asked by 30.05.2018 / 11:01
2
answers

Ajax / JQuery - How do I know if a request has been completed?

I have a simple ajax like this: function ajax() { $.ajax({ url: "../../api/utilitarios/cidades/estado", method: 'POST', dataType: 'json', success: function (data) { }, error: function (data)...
asked by 16.08.2016 / 21:37
3
answers

Optimize Ajax search that is slow

I'm experiencing slowness in this ajax search. <script type="text/javascript"> $('#nome').keyup(function () { var chars = (this.value); $.post('../Ajax/busca_nome', {val: chars}, function (busca) { $('#res...
asked by 20.05.2016 / 19:42
3
answers

How to list a json object to generate a txt file and download that file via ajax request?

I have an ajax request that sends a large object. That in the browser console is seen like this: Object {data: Array[4936], paging: Object} The following is the requisition code: $.ajax({ type: "POST", url: "gerararquivo.php",...
asked by 17.06.2015 / 19:31
2
answers

JSON PARSE returning 'object object'

I would like to know what is wrong with my function, because by assigning obj = data , it saves object object , the date value being a JSON returned by WEBSERVICE. Date value: [{"descricao":"Lorem ipsum dolor sit amet, consectet...
asked by 07.12.2018 / 15:34