Bjr,
g implemente le plugin contextMenu de jQuery et je voudrai récupéré,sur clic droit, les valeurs des 3 premiers TD de ma table et les passer via l'url.Voici un extrait du code :

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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
    if(isset($this->errorMessage))
    {
        echo $this->errorMessage;
    }
?>
 
<html>
<head>
    <title></title>
    <script type="text/javascript" src="<?php echo $this->baseUrl();?>/js/jquery-1.4.2.js"></script>
    <script type="text/javascript" src="<?php echo $this->baseUrl();?>/js/jquery.contextMenu.js"></script>
    <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->baseUrl();?>/css/jquery.contextMenu.css" />
 
    <script type="text/javascript">
 
            $(document).ready( function() {
 
                // Show menu when #myDiv is clicked
                $("#myDiv").contextMenu({
                    menu: 'myMenu'
                },
                                            $('table td').click(function(){
                                                var recupNum = $(this).parent().attr('id') ;
                                                alert(+recupNum);
                                            }));
 
 
                // Enable menus
                $("#enableMenus").click( function() {
                    $('#myDiv, #myList UL LI').enableContextMenu();
                    $(this).attr('disabled', true);
                    $("#disableMenus").attr('disabled', false);
                });
            });
 
        </script>
 
</head>
<body>
    <table cellspacing="0" cellpadding="0" width="850px" border="2">
        <tr style="font-weight:bold"><td width="79px">Numéro</td><td width="263px">Niveau</td><td width="152px">Année Début</td><td width="152px">Année Fin</td><td>Total des frais</td></tr>
</table>
    <table id="myDiv" cellspacing="0" cellpadding="0" width="850px" border="2">
    <?php
    $i= 1 ;
    foreach($this->objRowFraisNiveau as $resultat):
    {
    ?>
        <tr>
 
// C'est ici !
<td align="center"><?php echo $i++;?></td><td align="center"><?php echo $resultat["idNiveau"]; ?></td><td align="center"><?php echo $resultat["anneeDebut"]; ?></td><td align="center"><?php echo $resultat["anneeFin"]; ?></td>
 
<td align="center"><?php echo $resultat["total"]; ?></td></tr>
    <?php
    }
    endforeach ;
    ?>
</table>
    <script type="text/javascript">
    $(document).ready(function() {
        $('table#filterTable1').columnFilters({alternateRowClassNames:['rowa','rowb']});
    });
</script>
 
    <ul id="myMenu" class="contextMenu">
        <li class="edit"><a rel="nofollow" href="<?php echo $this->url(array('module'=>'inscription','controller'=>'index','action'=>'accueilaide')); ?>">D&eacute;tails</a></li>
        </ul>
</body>
</html>]
Merci d'avance.