Chaney08
(Paulchaney)
March 29, 2011, 10:24am
21
Thanks for all the replies Tommy, you have been a great help . However I still cant get this working lol. Im a complete noob when it comes to php and yii so I cant get that second example converted over, I can get it working in HTML but I cant get it working in php and yii .
tri
(tri - Tommy Riboe)
March 29, 2011, 4:57pm
22
Chaney08:
Thanks for all the replies Tommy, you have been a great help . However I still cant get this working lol. Im a complete noob when it comes to php and yii so I cant get that second example converted over, I can get it working in HTML but I cant get it working in php and yii .
Now I’ve read the thread from the beginning.
Were you able to get the first (charcounter) one working?
For a quick test I just pasted the following into my view (in my case the js directory is located one level above application dir)
$cs = Yii::app()->clientscript;
$cs->registerScriptFile(Yii::app()->baseUrl.'/../js/jquery.charcounter.js');
$cs->registerScript('limitText', '$("#'.CHtml::activeId($model, 'mytextarea').'").charCounter(5);');
If still no luck, check for error messages in Firebug Console.
/Tommy