registerScript with parameter

Hi alla! Anyone can tell me how can I get some parameter in javascript file inclusion?




            Yii::app()->getClientScript()

                    ->registerScriptFile('/js/myscript.js?param=value', CClientScript::POS_END);



How can I get "param" value inside the javascript script?

This is not possible with registerScriptFile AFAIK.

Can you create a method in your JS file which you can call with the parameters? If so, use registerScriptFile for the file, then use


registerScript('myId','myMethod('.json_encode($params).')');