Yii Framework Forum: micro bug - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

micro bug Rate Topic: -----

#1 User is offline   saegeek 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 244
  • Joined: 09-December 09
  • Location:Montpellier - France

Posted 12 April 2012 - 06:28 AM

@ CHtml::ajaxSubmitButton()

I get :
Missing argument 2 for CHtml::ajaxSubmitButton()...

While i can see in the doc :
Parameters: 
string $label the button label
mixed $url the URL for the AJAX request. If empty, it is assumed to be the current URL. See {@link normalizeUrl} for more details.


If empty or not-exist is a better behavior
And [for] their saying, "Indeed, we have killed the Messiah, Jesus, the son of Mary, the messenger of God ." And they did not kill him, nor did they crucify him; but [another] was made to resemble him to them. And indeed, those who differ over it are in doubt about it. They have no knowledge of it except the following of assumption. And they did not kill him, for certain.Rather, God raised him to Himself.
0

#2 User is online   Maurizio Domba 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,231
  • Joined: 12-October 09
  • Location:Croatia

Posted 13 April 2012 - 04:54 AM

If you use ajaxSubmitButton() it's supposed that you will want to give some ajax options and as that is the 3rd parameter how would you call this method without the second?
Find more about me.... btw. Do you know your WAN IP?
0

#3 User is offline   Tropi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 61
  • Joined: 30-November 11

Posted 19 April 2012 - 06:08 PM

ajaxSubmitButton() expects you to use at least 2 parameters. However if you pass an empty array it will still work, because of how normalizeUrl() and route lookup works.

Also as mdomba said, it doesn't make sense to make an AJAX call like that.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users