CodeIgniter Forums

Full Version: Javascript source writing out to HTML
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am using the following code to link to a javascript file I want to load.

<script src="<?php echo base_url(); ?>bootstrap/js/bootstrap.min.js"></script>

It is in a view called header_begin.php, which I load into another view.

<?php $this->load->view('loadfiles/header_begin');?>

All is working fine except for one strange thing.  Instead of putting the link to the Javascript file in the generated HTML, it outputs all of the JS (in the script tag and commented, so you can't see it on the page, but you see it in the source code).  This seems like strange behavior to me.  Is this intended, or is there a way to change it so that it doesn't all output to the HTML?  It makes the file larger and more annoying to wade through.