Where do I put inline script in head with Zend Framework?

Posted by Joel on Stack Overflow See other posts from Stack Overflow or by Joel
Published on 2010-05-19T22:15:49Z Indexed on 2010/05/19 22:20 UTC
Read the original article Hit count: 265

Filed under:
|

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!

© Stack Overflow or respective owner

Related posts about zend-framework

Related posts about mvc