I'm registering a script when a form is created:
Yii::app()->clientScript->registerScriptFile(
Yii::app()->baseUrl . '/js/activity_package.js',
CClientScript::POS_END
);
But I need to call renderPartial() when some records are created dynamically in the view, and it does the script load two or more times. How can I include my script so that there's certainty that it's loaded only one time?
renderPartial()view.registerScriptFile()from the controller, before the main view is rendered.