I know that the code to get a confirm message while clicking on a link is as given below.
<?php
echo $html->link('Delete',
array('controller'=>'forms','action'=>'delete', $r['Form']['id']),
array(),
'really delete the Form ?',
false
);
?>
I need an alert box saying “Your form has been deleted” after deleting the form by clicking on the ‘ok’ button in the confirm message.
Is there a method to get an alert box instead of the confirm box or an alert box after the confirm box?
I found out the answer which uses the Ajax helper. It is all in the cake book, I just need to read it more carefully. Instead of using $html->link,need to use $ajax->link
Here is the code to get the alert box in the html link.
The alert box is called after the action is completed and should be mentioned in the ‘complete’ condition of the $ajax->link array.