Javascript call to prototype js file doesn't work - pg. 116

2 messages Options
Embed this post
Permalink
MatthewJenkins

Javascript call to prototype js file doesn't work - pg. 116

Reply Threaded More More options
Print post
Permalink
Here is probably just another example of something that worked fine when the book was published, but now with Cake version 1.2 has broken.

This code in my layouts/default.ctp does nothing:

$javascript->link(array('prototype'));

view source gives me nothing in that spot in the html head.

Entering it manually works fine:
        <script manual type="text/javascript" src="/js/prototype.js"></script>

But I'd rather know the correct way to do it for the future.
Anyone know what's changed or how I should format that javascript helper call?

(Yes, javascript has been added to my helpers. No error is produced with above call.)
MatthewJenkins

Re: Javascript call to prototype js file doesn't work - pg. 116

Reply Threaded More More options
Print post
Permalink
And... I solved my own problem. So daft sometimes.

For those of you at my extreme beginner level, you can solve this by adding an "echo" to the beginning, and a ".js" to the end.

(duh.)