tax14
(Ravitaxali)
October 1, 2010, 11:10pm
1
I am sure that it must have been discussed several time in the forum. I did some search but could not find what I am looking for.
i. Is it possible to display a confirmation message, e.g. "Are you sure that you want to empty the cart?" on choosing an option from menu? How?
ii. How can I display a confirmation message in Controller’s action and take a decision based on the selection ?
junxiong
(Junxiong)
October 2, 2010, 6:23am
2
I am sure that it must have been discussed several time in the forum. I did some search but could not find what I am looking for.
i. Is it possible to display a confirmation message, e.g. "Are you sure that you want to empty the cart?" on choosing an option from menu? How?
ii. How can I display a confirmation message in Controller’s action and take a decision based on the selection ?
if you want to put confirmation in the link you can use like this :
<?php echo CHtml::link("Delete", "#", array("submit"=>array("MyController/delete","id"=>"$model->id" ),"confirm"=>"Are you sure?")); ?>
tax14
(Ravitaxali)
October 3, 2010, 6:25pm
3
junxiong:
if you want to put confirmation in the link you can use like this :
<?php echo CHtml::link("Delete", "#", array("submit"=>array("MyController/delete","id"=>"$model->id" ),"confirm"=>"Are you sure?")); ?>
Thanks. That works.
I would prefer to display the confirmation message when the user chooses an option from the menu. At present, my menu is based on the SMenu extension (http://www.yiiframework.com/extension/menu/ )