ajax et cela ne fonctionne pas alors je fais: ``` $(".frmComment").submit(function() { $.ajax({ method: "POST", url"../content/insertComment.php", data: $(".frmComment").serialize(), }) .done(function() { $(".return").html(" Votre commentaire a bien été enregistré
Récupération AJAX : https://imgur.com/v9e4TU5 Mes meta sans AJAX : https://imgur.com/QHnEtl2 Mes meta avec AJAX : https://imgur.com/PjYXzXi Ce que je vois en envoyant un lien : https://imgur.com/oypQQXy
AJAX** ``` div class="people-ident-box" id="PeopleBox" style="display:none;"> $(function(){ $(".search_bar_people").keyup(function() { var search_keyword_value = $(this).val(); var dataString = 'search_bar_people='+ search_keyword_value; if(search_keyword_value!='') { $.ajax({ type: "GET", url: "livesearch_people_ind.php", data: dataString, cache: false, success: function(html) { $("#result_people").html(html).show(); } }); } return false; }); $("#result_people").live("click",function(e){ var $clicked = $(e.target); var $name = $clicked.find('.country_name').html(); var decoded = $(" ").html($name).text(); $('#search_bar_people_id').val(decoded); }); $(document).live("click", function(e) { var $clicked = $(e.target); if (! $clicked.hasClass("search_bar_people")){ $("#result_people").fadeOut(); } }); $('#search_bar_people_id').click(function(){ $("#result_people").fadeIn(); }); }); $('html').click(function(event){ if(event.target.id == 'result_people') { //Do nothing } else { $('#result_people').css({ display : 'none' }); } }); .show-livesearch-people{ position: relative; float: left; width: 50%; max-width: 100%; max-height: 70px; overflow: hidden; border-bottom: solid 1px rgba(0,0,0,0.07); margin-bottom: 2px; margin-top: 2px; } #search_keyword_id_people { width: 700px; border: solid 1px #CDCDCD; padding: 5px; font-size: 14px; border-radius: 2px; position: absolute; left: -250px; height: 30px; top: -3px; } span.show-livesearch-live-people{ width: 33%; position: relative; left: 40%; top: -60px; text-align: center; font-size: 20px; } #result_people { position: absolute; width: 100%; display: none; overflow: auto; top: 32px; background-color: rgba(255, 255, 255, 1); z-index: 800; -webkit-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.1); -moz-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.1); box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.1); border-radius: 1px; max-height: 225px; } .show { font-family: 'Roboto', sans-serif; padding:10px; border-bottom:1px #CDCDCD dashed; font-size:15px; } .show:hover { background:#364956; color:#FFF; cursor:pointer; } ``` **Partie AJAX (livesearch_people_ind.php)** ```
AJAX ne fonctionne pas , mais je peux submitter le formulaire , je pense que ma probléme est avec le fosjsrouting bundle ou avec l'ajax , ceci ce que je fais : mon controlleur
Ajax et pour gagner en performance je souhaiterais mettre en cache les vue. Le problème c'est que selon comment le visiteur arrive sur cette page (lien direct ou ajax
ajax ({ }); return false; }); mais des que je rajoute la suite dans ajax ({}) le fichier nav.js n'est plus charger. Le code entier du fichier nav.js : /* */ $(document).ready(function(){ // alert('ok'); $("#nav_accueil
ajax par exemple lors de la suppression d'un commentaire.Je m'explique J'utilise $.get ('/delete/id',{parametres},function(data){},'json'); maintenant malheureusement ou heureusement,une personne sachant comment fonctionne le systeme
ajax pour charger de l'Xml et utilise jquery pour mettre en page ces données avec la méthode suivante : _$.ajax( { type: "GET", url: "xml/data.xml", dataType: "xml", success: function(xml) { $(xml).find
Ajax : ``` function remplir(obj) { var id = obj.id; var $this = $('#table-form'+id); if(obj.value == "Delete") { console.log("testbon"); } $(".load").show(); $.ajax({ url: $this.attr('action'), type: $this.attr('method'), data: $this.serialize(), dataType: 'json
Ajax. Apparemment il manquerait un argument à ma méthode destroy() mais je ne vois pas pourquoi :/ Si quelqu'un a une idée je suis preneur :) Merci à vous ! Controller : ``` public