We have a custom module with below code
app/design/frontend/rwd/Theme1/layout/aitcg.xml
<action method="addJs"><script>aitoc/aitcg/Aitcg/View/Abstract.js</script></action> As we can't use php code in this .JS file, is there any way we can move code present from Abstract.js file to some .phtml file ?
Edit
I followed Raphael's answer & changed code as here :
<block type="aitcg/template" name="aitcg_js_styles1" template="aitcg/js_styles1.phtml" /> but still Abstract.Js file results are not displaying in js_styles1.phtml
layout file : http://pastebin.com/BZGRaiDH
js_styles1.phtml : http://pastebin.com/m85q9eMh
i am trying onclick button = onclick="setproductlogin('<?php echo $_product->getEntityId()?>');setrequestlogin();" but this is not working in .JS file , so only i am trying to cop .js code to .php code.
<script> _getControlPanelHtml: function() { if (this.config.editorEnabled) { return '<div id="aitcg-control-panel">' + '<button id="submit-editorApply-{{rand}}" onclick="setproductlogin('<?php echo $_product->getEntityId()?>');setrequestlogin();">SAVE DESIGN</button>' + '<button id="submit-editorReset-{{rand}}" >{{reset_text}}</button>' + '</div>'; } return ''; }, </script> when i checked template path hints, it loading phtml file, but JS code result is not displaying in frontend. but other html, php, js code results are displaying.....
console
is we need to load any external js library if so how to find that ?
Edit2
I tried Below code in js_styles1.phtml file , but still its not working
<script type="text/javascript" src="http://sbdev2.kidsdial.com:81/js/aitoc/aitcg/Aitcg/View/Abstract.js"></script> 
