I am just wondering if it\'s possible to use external JS file that contains PHP code.
my external JS
$(document).ready(function(){
$(\'#update\
quite a common thing to want to do, just rename your js file to "external.js.php" (i use that method, but as long as it ends in php it doesn't matter what you use really) then just change the src url in your script tags and away you go.
Dont forget you may need to include function and config files into the javascript for that base_url() function to work.