Yii Framework Forum: js function fails - Yii Framework Forum

Jump to content

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

js function fails ...since updated to yii 1.11 Rate Topic: -----

#1 User is offline   Raoul 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 647
  • Joined: 29-November 08
  • Location:Paris, France

Posted 06 August 2012 - 05:31 PM

Hi,
since I've upgraded to Yii 1.11, the code below raises a JS error. If I remove the 'js:' prefix on the success function, everything works fine again.


		echo CHtml::ajaxLink('delete selection',
   			$this->createUrl('deleteBulkSent'),
   			array(
      			'type'	=> 'post',
      			'data'	=> "js:{ids:$.fn.yiiGridView.getSelection('message-grid'), YII_CSRF_TOKEN : '".$csrfToken."'}",
      			'success' => 'js:function(data, textStatus, XMLHttpRequest){'.
      					'if(data!=0)$.fn.yiiGridView.update("message-grid")}'
   			),
				array(
					'confirm' => 'are you sure ?',
				)
		);



If I understood correctly upgrade instructions, there should not be any change with 1.11, but obviously I missed something.
Thanks in advance for your help.
ciao
B)
0

#2 User is offline   riemann 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 23
  • Joined: 31-August 11
  • Location:Algeria

Posted 06 August 2012 - 10:27 PM

Hi,
I dont know if the probleme persiste or not but there are a fix in yii 1.1.12
https://github.com/y...t/yii/pull/1154
0

#3 User is offline   Raoul 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 647
  • Joined: 29-November 08
  • Location:Paris, France

Posted 07 August 2012 - 02:12 AM

Hi Riemann,
yes you're right, it seems to be the exact same issue, and it was fixed 12 hours ago ... I will rollback to 1.10 then, and wait for 1.12.
Thanks for your help
ciao
B)
0

#4 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,781
  • Joined: 17-January 09
  • Location:Russia

Posted 07 August 2012 - 04:43 AM

1.1.12 will be there this weekend if we'll be able to solve the rest of the issues planned.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
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