You can try this one out to see if it will work for you.
Code:
<html>
<head>
<title>Test</title>
<script src="test.js" type="text/javascript"></script>
</head>
<body>
<?php
echo '<script type="text/javascript">someFunction();</script>';
?>
</body>
</html>
You can also try to echo it from your controller.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )