AnsweredAssumed Answered

how to add js library to ftl template

Question asked by zhasik92 on Nov 15, 2016
Latest reply on Nov 16, 2016 by angelborroy

Hi, Community!

 

How to add JS library to ftl controller?

 

I've tried to add library  to mypopup.ftl:

<script type="text/javascript" src="${url.context}/res/js/yui-min.js"/>
or
<@script src="http://yui.yahooapis.com/3.18.1/build/yui/yui-min.js"></@>
but it is not working.


<
script type="text/javascript">
YUI().use("panel", function (Y) {  // loading escape only for security on this page
    ...
    });

});
<script/>

But everytime I get error YUI is undefined.

Outcomes