AJAX j'ai voulu supprimer une entrée en AJAX... Voyez vous mon erreur? a mon avis je renseigne mal le nom du formulaire dans le code ajax ? code ajax dans
ajax. Tout d'abord j'ai initisialiser masonry et infiscroll comme si je n'utilise pas d'ajax. ``` // init masonry var $container = $('#msnry-container'); $container.masonry({ itemSelector : '.article-item', Width: 200, }); // init
ajax. le code fonction tres bien et le fichier php me revoir bien success en cas de succes mais ajax execute le code error. dans le mm temps quand le php renvoir
AJAX, on obtient la page initial sans aucun contenu Ajax chargé ou encore mieux, le bon contenue Ajax chargé. Par exemple : On est sur la page avec aucun contenue Ajax
ajax_nopriv_voteme_ajaxhandler', 'voteme_ajaxhandler' ); add_action( 'wp_ajax_voteme_ajaxhandler', 'voteme_ajaxhandler' ); mon script ajax : function votemeadd(author_id,nonce) { $.ajax({ type: "POST", url: votemeajax.ajaxurl, data: { action: 'voteme
ajax lors de la pagination en scroll. Lorsque on scroll vers le bas, ajax fais appel à une page PHP qui charge les statuts suivants au fur et à mesure
ajax se lance pour aller chercher les informations correspondante en BDD. Vue que chaque champ fait partie d'une suite logique, si la premiére et modifié, celle d'aprés relance
ajax $(document).ready(function() { var Ville = ''; var Category = ''; var Partner = ''; var POST; $("#city-id").bind('change', function(e) { e.preventDefault(); Ville = $(this).find("option:selected").attr('value'); // $("#product-container").slideUp('slow'); $("#product-container #filters").find(".city").remove(); if ($(this).find("option:selected").text() !== "Ou ?") { $("#product-container #filters").append(" " + $(this).find("option:selected").text() + " "); } go(); }) $("#partner-id").bind('change', function(e) { e.preventDefault(); Partner = $(this).find("option:selected").attr('value'); // $("#product-container").slideUp('slow'); $("#product-container #filters").find(".partner").remove(); if ($(this).find("option:selected").text() !== "Qui ?") { $("#product-container #filters").append(" " + $(this).find("option:selected").text() + " "); } go(); }) $("#category-id").bind('change', function(e) { e.preventDefault(); Category = $(this).find("option:selected").attr('value'); //$("#product-container").slideUp('slow'); $("#product-container #filters").find(".marque").remove(); if ($(this).find("option:selected").text() !== "Quoi ?") { $("#product-container #filters").append(" " + $(this).find("option:selected").text() + " "); } go(); }) function go() { POST = {Deal: {city_id: Ville, category_id: Category, partner_id: Partner}}; $.ajax({ type: 'POST', url: 'fronts/test', data: POST, success: function(data) { $("#product-container ").slideDown('slow'); $("#product-container #container1").html(data); }, error: function(data) { alert('An unexpected error has occurred!'); $("#product-container ").slideDown('slow'); $("#product-container #container1").html(' errooor '); } }); } }); j'ai fais une fonction de test dans le contrôleur **FrontsController** juste pour tester , public function test(){ die('Contenu Ajax'); } public function test(){ die('Contenu Ajax'); } le problème c'est dans
Ajax:** ``` $(document).ready(function() { $('#updateprofile').on('submit', function(e){ form = $('form#updateprofile') button = form.find('button'); $.ajax({ url: './users/update.php', type: 'POST', data: $(this).serialize(), dataType: 'json', beforeSend: function() { $(".spinner-grow").removeClass
ajax({ url : 'index.php?c=Contact&a=relance&ajax=true', type : 'POST', data : formDatas, dataType : 'JSON' }) .done(function(data, text, jqxhr){ content.html('Envoi terminé ! '+jqxhr.responseText ); }) .fail(function(jqxhr){ content.html( ' Erreur : '+jqxhr.responseText