以yii ajaxly形式提交向服务器发送两个请求

时间:2012-12-23 09:57:31

标签: ajax yii

我有一个带有dropDownList的表单。我将在下拉列表更改后,应用程序以获取方法向操作发送请求。

我的js功能是:

$('#SiteWidget_type').change(function(){
    $.ajax({
       type: 'GET',
        url: "<?php echo CController::createUrl('siteWidget/au'); ?>" ,
        data: {id: $(this).val()},
        success:function(msg){
                    $('#W_1_layout').html(msg);
                  },
       error: function() { 
             //alert(error);
        },

      dataType:'html'
  });

});

但是有两个请求已经提交行动,我不知道为什么 firebug screenshot

0 个答案:

没有答案
相关问题