I want to load the JS
file in view to avoid heavy-loading of my application. I am using this JS
file for CgrdView
in view. SO i tried this:
Yii::app()->clientScript->registerScriptFile(
Yii::app()->baseUrl.'/assets/9d419b82/jquery.ba-bbq.js?v=1.0.127'
);
in My view header. But i am getting the error:Uncaught ReferenceError: jQuery is not defined As stated, i want to load jquery.ba-bbq.js file in view for CgriView, but i am not able to load that. Instead, i use following, but dont know is the efficient way to load or not.
<script src="/assets/9d419b82/jquery.ba-bbq.js?v=1.0.127" type="text/javascript"></script>
And is working when i load that in layouts, but this is not the efficient way.
FYI: I am working with cgridview
search-box to post the search-box entry to my controller.