Issues

ZF-4550: Wrong examples in the HeadScript Helper documentation

Issue Type: Docs: Problem Created: 2008-10-10T16:36:46.000+0000 Last Updated: 2008-11-13T14:10:21.000+0000 Status: Resolved Fix version(s): - 1.7.0 (17/Nov/08)

Reporter: Isaak Malik (isaak) Assignee: Jon Whitcraft (sidhighwind) Tags: - Zend_View

Related issues: Attachments:

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.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts