Yii Framework Forum: GoogleAPI: jQuery.yii is undefined - Yii Framework Forum

Jump to content

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

GoogleAPI: jQuery.yii is undefined jQuery.yii is undefined when using google API Rate Topic: -----

#1 User is offline   Thomas Jensen 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 150
  • Joined: 01-August 09

Posted 02 August 2009 - 07:34 AM

I would like to use jQuery in my scripts, and i therefor use this in the head of my layout file:

<?php echo CGoogleApi::init(); ?>
 
<?php echo CHtml::script(
    CGoogleApi::load('jquery','1.3.2') . "\n"
); ?>


The problem is that all functions like
<?php echo CHtml::linkButton('Delete', array(
    'submit'=>array('comment/delete','id'=>$comment->id),
    'confirm'=>"Are you sure to delete comment #{$comment->id}?",
)); ?>


stops working.
Firebug shows the error: jQuery.yii is undefined
When changing jQuery.yii to jQuery in the CHtml class, then submitFunction is undefined. I suppose i can keep on tracking down these errors, but isn't there a better solution?
0

#2 User is offline   Thomas Jensen 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 150
  • Joined: 01-August 09

Posted 02 August 2009 - 12:46 PM

Any body with a clue? :)
0

#3 User is offline   tri 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,651
  • Joined: 20-November 08
  • Location:Stockholm, Sweden

Posted 02 August 2009 - 01:32 PM

Concerning jQuery.yii: yes, it's a Yii-specific plugin. Have a look in framework/web/js/source. As for GoogleApi: No, I haven't tried it.

/Tommy
Don't forget to read The Definitive Guide to Yii (en) (sv) | The class reference has the details
0

#4 User is offline   CTala 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 53
  • Joined: 17-August 11
  • Location:Chile

Posted 31 May 2012 - 10:06 AM

Did you fix this trouble ? I am having the same one and could be really useful for me.
--
MSc. Cristian Tala Sánchez
0

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