HI guys, my application uses a lot of different javascript files. SO I tried to be quick about it and accomodate all the files in one single file. This I did by creating a single php with the following code:
<?php
header('Content-type: text/javascript');
$js = array( .... ); // all files to include
$js = array_unique($js);
foreach($js as $oneJs)
require_once('scripts/'.$oneJs);
And including a reference to this file where I need to include the javascript as:
<script type="text/javascript" src="includes/js.php"></script>
I'm using prototype js here and the scriptaculous libraries - the problem is that I'm getting loads of errors and now half my javascritp wont run. Especially now I'm getting the $ is not defined error. I've included prototype in the list but I'm still getting this error - help please!!!