|
Posted by clashers5@gmail.com on 10/17/06 03:03
Yes.
Put the foo.js text in the bar.php file or read it from a database or
text file and have php spit it out. Whatever suits your fancy.
Then, when bar.php receives the query string variable file with the
value foo, have it first print the type of the output with this code:
header('Content-type: text/javascript');
and then have it print the contents of foo.js (whereever you may have
stored them)
HTH
-Joe
On Oct 16, 10:41 pm, "Bryan" <BTRichard...@gmail.com> wrote:
> Hello all,
>
> In some html code I have the following:
>
> <script type='text/javascript' src='foo.js'></script>
>
> However, I'd like to replace 'foo.js' with something like
> "bar.php?file=foo" and have bar.php echo foo.js back to the script
> element. Is this possible?
[Back to original message]
|