2014-03-25 59 views
1

一个人怎么可以在下面创建一个链接到一个特定的动作,尝试过这种方法,但它不能正常工作,考虑到裸我也有一个文件夹countaing控制器,admim /控制器/动作Zend的链接按钮

<button type="button"><a href="<?php echo $this->url(array('controller' =>'smme', 'action' => 'client'))?>">Previous</a></button> 

在此先感谢

回答

1

例如,你可以做这样的事情:

$button = new Zend_Form_Element_button('button'); 
$button->setAttrib('id', 'bouton'); 
$button->setLabel('Previous'); 
$button->setAttrib('onClick', "parent.location='" . Zend_Controller_Front::getInstance()->getBaseUrl() .'/smme/client' ."'"); 
+0

完美的工作表示感谢。顺便说一句,doydoy是你的zend开发者吗? –

+0

不客气。 :)我不是Zend的开发人员,但我使用Zend开发。 :) – doydoy44

+0

谢谢你..你总是有最好的解决方案 –