【问题标题】:JS helper submit works but link wouldn'tJS 助手提交作品,但链接不会
【发布时间】:2012-04-29 18:29:40
【问题描述】:

我需要使用链接而不是在 JS 助手中提交。不幸的是,我的提交代码工作正常,但是当我尝试通过将 $this->Js->submit 更改为 $this->Js->link 将相同的代码从提交切换到链接时,它不起作用

这行得通

echo $this->Js->submit("Delete", array(
    'before'=>$this->Js->get('#sending')->effect('fadeIn'),
    'success'=>$this->Js->get('#sending')->effect('fadeOut'),
    'update'=>'#success',
    'url' => array(
    'action' => 'delete',$team['Team']['id']
    ),                      
));

这不起作用

 echo $this->Js->link("Delete", array(
        'before'=>$this->Js->get('#sending')->effect('fadeIn'),
        'success'=>$this->Js->get('#sending')->effect('fadeOut'),
        'update'=>'#success',
        'url' => array(
        'action' => 'delete',$team['Team']['id']
        ),                      
    )); 

【问题讨论】:

    标签: cakephp cakephp-1.3 cakephp-2.0


    【解决方案1】:

    好的,找到解决办法

    这行得通

    <?php  
          echo $this->Js->link('Delete', 
                                    array(
                                       'action' => 'edit_reload',
                                       'team_id'=>$team['Team']['id']
                                     ), 
                                     array(
                                       'update' => '#success'
                                     )
                              ); 
    ?>  
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-15
      • 2019-10-12
      相关资源
      最近更新 更多