Bonjour à tous,
après une brève recherche je n'ai pas trouvé de réponse à ma question.
Les onclick du code suivant ne fonctionnent pas, d'après mon debug à cause du foreach.
Comment remplacer ce foreach pour permettre au JS de faire son oeuvre? ^^
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 {foreach from=$tab key=k item=v} <tr> {if !isset($projetlist)} <th><a href="{$page}&action=del&pid={$v.id}&sid=0" onclick="confirm(\'Etes-vous sûr de vouloir supprimer le projet {$v.nom} ?\');return false;"><img src="images/delete.png"></a></th> <td><a href="{$page}&action=aff&pid={$v.id}&sid=0">{$v.nom}</a></td><td>{$v.desc}</td><td>{$v.cdate}</td><td>{$v.cdate}</td> {else} <th><a href="{$page}&action=del&pid={$v.id_projet}&sid={$v.id}" onclick="confirm(\'Etes-vous sûr de vouloir supprimer {$v.nom} ?\');return false;"><img src="images/delete.png"></a></th> <td><a href="{$page}&action=aff&pid={$v.id_projet}&sid={$v.id}">{$v.nom}</a></td><td>{$v.desc}</td><td>{$v.cdate}</td><td>{$v.cdate}</td> {/if} </tr> {/foreach}
Merci.
Partager