Where do I put inline script in head with Zend Framework?
- by Joel
I'm reading the manual here:
http://zendframework.com/manual/en/zend.view.helpers.html
but I'm still confused. I have a script in my head that I'm converting to the layout/view for the Zend MVC:
<script type="text/javascript">
var embedCode = '<object data="http://example.com" type="application/x-shockwave-flash" height="385" width="475"><param name="src" value="http://example.com" /><param name="allowfullscreen" value="true" /></object>'
</script>
I first tried to add it is an external file like this (in layout):
$this->headScript()->appendFile('js/embeddedVideo.js')->appendScript($onloadScript);
<head>
<?php echo $this->headScript(); ?>
</head>
Didn't really work, but anyway, I'm wanting to just add the script and not add it as an external file. How do I do that?
Thanks!