I am using cakephp version 2.x.
I am getting one trouble while deleting any record. I want to show confirmation message before delete my record. The JavaScript onclick function not working. Please check below code.
Code:
<?php
echo $this->Html->image('delete.png', array(
'title' => 'Delete',
'alt' =>'Delete' ,
'url' => array(
'controller' => 'products',
'action' => 'deletequery/'.$query['Query']['id']),array('confirm' => 'Are you sure you want to delete?')
)
);
?>
OutPut:
<a href="/products/deletequery/15">
<img delete?="Are you sure you want to delete?" to="" want="" sure="" you="" are="" alt="Delete" title="Delete" src="/img/delete.png">
</a>