php - Yii CHtml::ajaxSubmitButton always submits data in POST method -


When I used the CFTL :: AjaxSubmit button, I came to this problem, some data was found in the form of the GET method To deposit in No matter what I try, it always submits data as a POST method.

Can anything go wrong? Here's my code.

  Echo CHtml :: Startup (array ('ShoppingCart / Ed Itam', 'GET')); Echo CHtml :: textField ('qty', 1, array ('size' => 3); Echo CHtml :: hidden field ('product_id', $ model-> product_id); AnchoCOMTL :: AjaxSubmitButton ('Submit', array ('Shopping Cart / Ed Itam'), array ('type' = & gt; 'GET', // 'data' => (array)), ); Echo CHtml :: endForm ();    

It is designed according to you instead of CHtml :: ajaxbutton :

  CHtml :: Ajax Button ('My label', 'Controller / verb', array ('type' = & gt; 'GET',), array ('Type' = & gt; 'submit',);    

Comments

Popular posts from this blog

asp.net - Procedure or function "Procedure name" expects a parameter "Param name" which was not supplied occurs rarely -

c# - The item with identity 'Id' already exists in the metadata collection. Parameter name: item -

c++ - Redefined variable in the other module -