Yii Framework Forum: Why CStarRating widget always displaying radio buttons? - Yii Framework Forum

Jump to content

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

Why CStarRating widget always displaying radio buttons? Rate Topic: -----

#1 Guest_sirin_*

  • Group: Guests

Posted 21 June 2011 - 05:02 AM

im using CStarRating widget in my project.here is my sample code for that,

$this->widget('CStarRating',array(
'name'=>'test',
'value'=>3,
'minRating'=>1,
'maxRating'=>5,
'starCount'=>5,
'ratingStepSize' =>1,
'readOnly'=>true,
));

but it always displaying radio buttons instead of stars.i have tested this code in all portions of my project but it is still like that only.i dont know why.Even just before it was fine but i cant found out why it is displaying radio buttons nw.Please help me.

Reagards,
sirin k
0

#2 Guest_sirin_*

  • Group: Guests

Posted 21 June 2011 - 08:33 AM

i got some unexpected issues like displaying radio buttons instead of stars in CStarRate widget in yii,also my other ajax codes are not working .One and only reason for this unexpcted errors is that i have re-used the jquiry libray in my main.php

thats is :<script type="text/javascript" src="/portal1/js/jquery-1.3.2.min.js"></script>

Actually we dont need to do this because jquiry is already shipped with Yii.

Regards,

sirin k
0

#3 User is offline   arnO 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 04-January 12

Posted 07 March 2012 - 01:07 PM

View Postsirin, on 21 June 2011 - 08:33 AM, said:

i got some unexpected issues like displaying radio buttons instead of stars in CStarRate widget in yii,also my other ajax codes are not working .One and only reason for this unexpcted errors is that i have re-used the jquiry libray in my main.php

thats is :<script type="text/javascript" src="/portal1/js/jquery-1.3.2.min.js"></script>

Actually we dont need to do this because jquiry is already shipped with Yii.

Regards,

sirin k

To avoid any conflict when you have a jquery call in your page, you can test if there is already another one.

Here is an example

<script type="text/javascript">
if (typeof jQuery == 'undefined') {
     document.write('<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.js" type="text/javascript"><\/script>');
}
</script>


Regards,

arnO
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