:yii ajaxSubmitButton赢得';我无法识别我的动作url

:yii ajaxSubmitButton赢得';我无法识别我的动作url,yii,Yii,我有一个更新表单,在该表单中有一个表,在填写了几个字段后,我想使用ajax填充该表。我尝试过使用ajaxSubmitButton,但不知何故,它无法触发我想要的操作 以下是我的看法: <?php echo CHtml::ajaxSubmitButton('Insert', array('myController/insertProgress'), array( 'type' => 'POST', 'success' => 'funct

我有一个更新表单,在该表单中有一个表,在填写了几个字段后,我想使用ajax填充该表。我尝试过使用
ajaxSubmitButton
,但不知何故,它无法触发我想要的操作

以下是我的看法:

<?php
    echo CHtml::ajaxSubmitButton('Insert', array('myController/insertProgress'), array(
         'type' => 'POST',
         'success' => 'function(){
               alert("success");
               }',
         'data' => array(
               'progress' => 'js:$("#progress").val()',
                ),
          )
   );                    
?>
单击submit按钮时,它不会触发
insertProgress
操作,而是触发主窗体操作,即
actionEdit
。就好像我提供的URL被忽略了一样

此表单的url如下所示:
(sitename)/(modulename)/myController/edit/id/57

多谢各位

编辑:我有另一个提交按钮来更新整个表单,这会触发
actionEdit
操作

EDIT2:这是小部件产生的结果:

<script type="text/javascript">
/*<![CDATA[*/
jQuery(function($) {
jQuery('body').on('click','#yt0',function(){jQuery.ajax({'type':'POST','data':{'progress':$("#progress").val()},'url':'http://inarac.id/adm/topikkajian/insertProgress','cache':false});return false;});
});
/*]]>*/
</script>

/**/

如果您正在使用模块,则应将modele路径添加到链接中

  $myLink = Yii::app()->getBaseUrl(true) . 
         '/index.php/moduleName/myController/insertProgress';

<?php
    echo CHtml::ajaxSubmitButton('Insert',   
       $myLink, array(
     'type' => 'POST',
     'success' => 'js:function(){
           alert("success");
           }',
     'data' => array(
           'progress' => 'js:$("#progress").val()',
            ),
      )
   );                    
?>
$myLink=Yii::app()->getBaseUrl(true)。
“/index.php/moduleName/myController/insertProgress”;

谢谢你的回复!我尝试添加您提到的模块路径,但它仍然忽略了我提供的url,并触发了
actionEdit
,而不是
actionInsertProgress
。(
$myLink=Yii::app()->getBaseUrl(true)。/adm/topikkajian/insertProgress';
)或者尝试在浏览器中简单地对路径/url进行数字排序,这样您就可以测试url是否正确。我选中了url,它确实指向了正确的位置,但是
ajaxSubmitButton
无法使用它。是的,我已经测试了url
$myLink
生成的结果,结果很好。我真的不知道我在这里哪里出了错…为了测试,你应该使用js:function来提醒-我已经更新了答案
  $myLink = Yii::app()->getBaseUrl(true) . 
         '/index.php/moduleName/myController/insertProgress';

<?php
    echo CHtml::ajaxSubmitButton('Insert',   
       $myLink, array(
     'type' => 'POST',
     'success' => 'js:function(){
           alert("success");
           }',
     'data' => array(
           'progress' => 'js:$("#progress").val()',
            ),
      )
   );                    
?>