2012-04-29 37 views
0

我用這JS助手鍊接,不同的動作

   echo $this->Js->submit("Send", array(
       'before'=>$this->Js->get('#sending')->effect('fadeIn'), 
       'success'=>$this->Js->get('#sending')->effect('fadeOut'), 
       'update'=>'#success'        
        )); 

這是index.ctp和的onclick它關係到控制器的索引行爲。但我希望它採取不同的行動。我怎麼做的。 感謝

回答

0

得到它的工作呢

需要一個URL陣列不同的動作

echo $this->Js->submit("Send", array(
'before'=>$this->Js->get('#sending')->effect('fadeIn'), 
'success'=>$this->Js->get('#sending')->effect('fadeOut'), 
'update'=>'#success', 
'url' => array(
    'action' => 'pp' 
     ),      
));