Does this happen if you try to put the headScript() calls into your
view script itself and not in the action? Do you have error_reporting
set to E_ALL and do you notice anything such as a notice or a warning?
--
Chris Weldon

On Thu, Jan 29, 2009 at 4:24 AM, Michel Morelli <[email protected]> wrote:
> Hi all. I have this piece of code:
>
> public function formAction() {
>          $this->view->headScript()->appendFile('/js/myscripts.js');
>          $this->view->headScript()->appendFile('/js/jquery.tooltip.js');
>          $this->view->headScript()->appendFile('/js/jquery.dimensions2.js');
>
>  $this->view->headLink()->appendStylesheet('/js/jquery.tooltip.css');
>         .....
> }
> and the HTML output is:
>
> <script src="/js/jquery.tooltip.js" type="text/javascript"></script>
> <script src="/js/jquery.dimensions2.js" type="text/javascript"></script>
>
> Where is /js/myscripts.js ?
>
> If I invert the first two line the output is:
>
> <script src="/js/myscripts.js" type="text/javascript"></script>
> <script src="/js/jquery.dimensions2.js" type="text/javascript"></script>
>
> The  first script is always not writed. Infact if I insert a 4th line:
>
>       $this->view->headScript()->appendFile('/js/jquery.tooltip.js');
>      $this->view->headScript()->appendFile('/js/myscripts.js');
>          $this->view->headScript()->appendFile('/js/jquery.dimensions2.js');
>          $this->view->headScript()->appendFile('/js/myscripts2.js');
>         the HTML output is :
>
> <script src="/js/myscripts.js" type="text/javascript"></script>
> <script src="/js/jquery.dimensions2.js" type="text/javascript"></script>
> <script src="/js/myscripts2.js" type="text/javascript"></script>
>
>
> I have solved with this line before others:
>
> $this->view->headScript()->appendFile('');
>
> Why this ? Is this a bug or what ?
>
> M.
>
> --
> Michel 'ZioBudda' Morelli                       [email protected]
> Consulenza sistemistica in ambito OpenSource.
> Sviluppo applicazioni web dinamiche (LAMP+Ajax)
> Telefono: 0200619074
> Telefono Cell: +39-3939890025 --  Fax: +39-0291390660
>
> http://www.ziobudda.net                         ICQ: 58351764
>  http://www.ziobuddalabs.it                      Skype: zio_budda
> http://www.ajaxblog.it                          MSN: [email protected]
>                                                                  JABBER:
> [email protected]
>
>



-- 
Christopher Weldon
http://chrisweldon.net
[email protected]

Reply via email to