Yii Framework Forum: jQuery.yii is undefined after ajax request - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

jQuery.yii is undefined after ajax request langBox widget Rate Topic: -----

#1 User is offline   daonhack 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 34
  • Joined: 02-June 09

Posted 11 October 2009 - 10:54 PM

Here http://www.yiiframew...oc/cookbook/26/ the link i posted comment for yii cookbook. Any suggestion will appreciate :)

[SOLVED]: I solved this by register yii script in controller of ajax request "controller/action"
Yii::app()->getClientScript()->registerCoreScript('yii');
1

#2 User is offline   Tyr84 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 08-January 10

Posted 23 May 2010 - 12:22 AM

Oh Tnx man!
That work perfect to me to.
I dont understand about this clien script.
Is there any tutorial? Cause i want to publish some my js...
But i dont know hot to write js, that will be corect.
Always i get jquery not defined error :(

View Postdaonhack, on 11 October 2009 - 10:54 PM, said:

Here http://www.yiiframew...oc/cookbook/26/ the link i posted comment for yii cookbook. Any suggestion will appreciate :)

[SOLVED]: I solved this by register yii script in controller of ajax request "controller/action"
Yii::app()->getClientScript()->registerCoreScript('yii');

0

#3 User is offline   Sofia Arrambide 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 30-April 11

Posted 14 June 2011 - 08:30 AM

You just saved me from what would have been an frustrating long search! THKS!
0

#4 User is offline   glyph 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 16
  • Joined: 20-April 12
  • Location:Michigan, USA

Posted 25 May 2012 - 02:22 PM

Yii::app()->clientScript->scriptMap['*.js'] = false;


added to a controller action method will prevent an ajax-loaded div from clobbering jQuery.yii

I found that some ajax loaded divs were breaking my CRUD delete button, which was calling jQuery.yii.confirmSubmit.

Once I added the scriptMap * js false to my ajax update methods, it allowed the delete button to find jQuery.yii again.
-------------------------------------------------
Glyph Imaging and Data Services
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

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