Yii CHtml :: ajaxSubmitButton总是在POST方法中提交数据

I came across this problem when I used CHtml::ajaxSubmitButton to submit some of the data as a GET method. No Matter what i try, It always submits data as a POST method.

Anything that I might be doing wrong? Here's my code.

echo CHtml::beginForm(array('shoppingCart/addItem','GET')); 
echo CHtml::textField('qty', 1, array('size' => 3));
echo CHtml::hiddenField('product_id', $model->product_id); echo CHtml::ajaxSubmitButton('submit',          
                array('shoppingCart/addItem'), 
                array(
                        'type'=>'GET',
                        //'data' => array()),
                ));

echo CHtml::endForm();
查看全部
dongzg2006
dongzg2006
2014/04/22 06:30
  • yii
  • php
  • ajax
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

2个回复