Externalize Javascript in YAP
I am working on a Yahoo! App which requires certain external Javascript Frameworks to be loaded and used. Also in the Yahoo! App Best Practices Guide, it is also mentioned that the sources should be externalized, however, externalization isn't working for me.
I am using the standard procedure to load the external JS file like the following:
<script src="http://www.google.com/js/nxsl.1.js"></script>
But the above statement is giving me an error that external sources are not allowed.
Is there any way to use external JS files as I don't want to include all of my JS开发者_如何学C Login inline, it doesn't make sense to me and majorly my code won't be re-usable.
Any thoughts ?
Take a look at Yahoo's Get utility. It's part of their YUI library. It enables cross-site loading and is easy to use. You can read about it here:
http://developer.yahoo.com/yui/get/
精彩评论