bonjour j ai un petit problème avec ma fonction jquery je ne sais pas d'ou ça vient , je pense avoir bien codé.
voici ma fonction load_updatenews
mon tableau qui contient des données et deux liens modifier et supprimer
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
19
20
21
22
23
24
25
26
27 <script> function load_updatenew(url) { $("a.test").click (function()){ var page=$(this).attr("a.test"); jQuery.ajax({ url:page, dataType: "html", cache: false, success: function(data, textStatus, rawRequest) { jQuery("#centre").html(data); }, error: function(rawRequest, textStatus, errorThrow) { //jQuery(element).html("Impossible de charger les d�tails de la page..."); jQuery("#centre").html("Erreur de chargement..."); } }); }); } </script>
mon problème est que si je click sur mon lien ça me retourne pas le contenu dans la balise centre mais dans une nouvelle page merci pour votre aide
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
19
20
21
22
23
24
25 <table > <caption>GESTION DES UTILISATEURS</caption> <thead> <tr> <th>Titre</th> <th>Body</th> <th>Date</th> <th>Supprimer</th> <th>Modifier</th> </tr> </thead> <tbody> <tr> <td >{news_title}</td> <td >{news_body}</td> <td >{news_date}</td> <td ><a href="index.php?module=deletenews&action=deletenews&news_ref={news_ref}" onclick="javascript:if (!confirm('Voulez vous supprimer l'utilisateur Confirmez ?')) return false;">Supprimer</a></td> <td > <a class="test" href="index.php?module=updatenewsform&action=updatenewsform&news_ref={news_ref}" onclick="load_updatenew('views/updatenews.html'); ">Modifier</a></td> </tr> <tbody> </table> mon mon
Partager