Bonsoir comment fait t'on pour concaténer une variable javacript
comment écrire le "motcle" après le ":" ? j'ai essayer 'motcle':+motcle+}, mais ça ne fonctionne pas
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 if(motcle.length>2) { $(".loading").show(); var DATA = 'motcle=' + motcle; $.ajax({ type: "POST", url: "{{ path('liste_cp',{'motcle':'motcle'}) }}", data: DATA, cache: false, success: function(data) { $('#resultats_recherche').html(data); $(".loading").hide(); } }); }
je vous remercie d'avance pour la réponse (je suis sous symfony2)
Partager