ZF-4550: Wrong examples in the HeadScript Helper documentation
Description
This example taken from the manual:
// place at a particular offset to ensure loaded last $this->headScript()->offsetSetScript(100, '/js/myfuncs.js');
// use scriptaculous effects (append uses next index, 101) $this->headScript()->appendScript('/js/scriptaculous.js');
// but always have base prototype script load first: $this->headScript()->prependScript('/js/prototype.js');
Should be:
// place at a particular offset to ensure loaded last $this->headScript()->offsetSetFile(100, '/js/myfuncs.js');
// use scriptaculous effects (append uses next index, 101) $this->headScript()->appendFile('/js/scriptaculous.js');
// but always have base prototype script load first: $this->headScript()->prependFile('/js/prototype.js');
As the (append|prepend|offsetSet)Script() methods take JavaScript code as arguments and not an external file.
Comments
Posted by Jon Whitcraft (sidhighwind) on 2008-10-22T14:27:15.000+0000
Fixed with r12084
Posted by Wil Sinclair (wil) on 2008-11-13T14:10:21.000+0000
Changing issues in preparation for the 1.7.0 release.