在CakePHP中为删除操作实现可点击图像?

时间:2012-05-16 10:20:12

标签: javascript event-handling cakephp-1.3

我想使用可点击图片来触发删除操作。单击时,我还需要加载警报消息以确认操作。任何人都可以建议如何将其实现到我现有的代码中,如下所示:

echo $popup->link($html->image("delete.jpg", array('alt' => 'Delete', 'title'=>'Delete Enquiry')));

1 个答案:

答案 0 :(得分:0)

我发送蛋糕我们正在发出如下警告: -

<?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $tduPrice['TduPrice']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $tduPrice['TduPrice']['id'])); ?>

根据您的代码进行修改..