I think i know what you mean now. You want a js file to be sent to the client, but you want to process it as PHP so you can modify the js file before sending it to the client.
If so, try:
<Directory /var/www/somespecialjsfolder >
AddType application/x-httpd-php .js