2008年12月30日星期二

Re: [fw-mvc] Can't manipulate the Dojo addOnLoad queue

-- Drew Bertola <drew@drewb.com> wrote
(on Tuesday, 30 December 2008, 04:54 PM -0800):
> Drew Bertola wrote:
> > I can work around this with:
> >

> > $view->dojo()->addJavascript("dojo.addOnLoad(function(){my.whatever.someFunc();});");
> >
> >
>
> I've now refined this to:
>
> ->addJavascript('dojo.addOnLoad(my.init);')
>
> Which is slightly better... but still feels clumsy.

I can't remember the rest of the thread... but why aren't you using
addOnLoad()?

$view->dojo()->addOnLoad('function(){my.whatever.someFunc()};');

or

$view->dojo()->addOnLoad('my.init');

?

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: