Questions tagged as 'ajax'

0
answers

window.open is not working after running Ajax

I'm developing a database-sharing URL saving system every time I click on one of the site's social networks. It turns out that the window.open that I use to access the social network is not working after the Ajax call. Does anyone h...
asked by 18.08.2017 / 16:11
1
answer

Angular + requirejs Controller registry error

I'm starting an application with Angular + RequireJs. See below Main.js ;(function (doc, undefined) { 'use strict'; var $scriptDefault = doc.querySelector('[data-js="script-default"]'); var BASE_URL = $scriptDefault.getAttribute('data-base...
asked by 18.08.2017 / 03:50
1
answer

Wordpress using ajax in page template

Based on the topic below: link I made a code to run using ajax in my WP project, the thing is that this code is in an external site area. To make this area accessible, I used a template within the theme. I thought it would be correct to put...
asked by 14.10.2016 / 14:01
1
answer

How do I pass a value from javascript to PHP?

I have a select that lists all my players: <select name="jogador" id="cod_jogador"> <option name=""></option> <?php foreach($jogadores as $jogador): ?> <option id="codigo" value="<?= $jogador['cod_...
asked by 10.08.2017 / 20:17
2
answers

Session does not work as expected in Ajax and PHP request

Well I have a main page index.php where the person performs an action and performs a POST with Ajax request. In this main file I create a session with some data that I want to keep more secure and not be visible and others for confirmations....
asked by 12.08.2017 / 21:21
1
answer

Ajax does not work

I have this code below in ajax: <script> $("a").live("click", function(event) { var targeturl = $(this).attr("href"); $.ajax({ type: "get", url: "/"+targeturl +"", data:...
asked by 24.08.2017 / 23:15
3
answers

reading return json_encode php with ajax

I get this return with json_encode by php but I can not read it in ajax success, what am I doing wrong? {"id":"1","id_pesquisa":"3","id_pergunta":"7","id_resposta":"31","mostrar":"1","ocultar":"2"}, {"id":"2","id_pesquisa":"3","id_pergunta":"8...
asked by 24.08.2017 / 19:23
0
answers

How to update MySQL database with Ajax + PHP

I need to do an update to my MySQL database asynchronously. I have a table with bank results. <?php $sqlCategoria = "SELECT * FROM categorias"; $resultCategoria = mysql_query($sqlCategoria); while($categorias = m...
asked by 07.08.2017 / 19:49
1
answer

Ajax and PHP Update

I'm having a problem editing the database values. My Script Code: $(function(){ $(document).on('click', '#salvar_pedido', function(e) { e.preventDefault; var id = $(this).closest('tr').find('td#id').html(); var nome = $(this).clos...
asked by 06.08.2017 / 22:28
1
answer

How to pass, via AJAX, multiple forms with multiple files

I have 3 forms on the same page, where each form has inputs of the file type. I need to click on a single button, it is possible to correctly use Ajax to forward all fields (mainly that $ _FILES is available in the PHP page). I've tried the f...
asked by 06.08.2017 / 21:31