[eluser]pickupman[/eluser]
Quote:But how can you pass this to the JavaScript file? You can’t just put <?php echo $session_id; ?> in a .js file. How is this commonly done?
Sometimes you need to use a php file extension. As long as it falls in a script tag to include the source. It will get parsed as php by the server, and interpreted by the browser as javascript. With CI, other than including jQuery source or plugins, all of my js scripting is done in php files.