use Yii formatted URL

and only load clientScript once