0

Referencing JavaScript Files

I've been looking into porting our OpenSocial application to Yahoo, and I'm running into an issue with referencing external javascript & css files.

For example, if I have this in my canvas page view:
<script type="text/javascript" src="http://www.google-analytics.com/ga.js"></script>

In my debug output, it complains with:
stdin:1: <script type="text/javascript" src="http://www.google-analytics.com/ga.js"></scr
^^^
WARNING: stdin:1+32 - 35: failed to load external url http://www.google-analytics.com/ga.js

Is there any kind of workaround for this? Or is this just not allowed?

Thanks!

by
2 Replies
  • Hi Steven,

    Currently Caja does not support external scripts. More information on some of the restrictions Caja enforces can be this can be found on http://developer.yahoo.com/yap/guide/what-...imitations.html

    The work around is to inline the script. That seems like it would work for the GA script as it is a generic script.

    Tom
    0
  • Hey

    I'm having the same issue.. and that link now is 404.. seems moved or just unavailable... Is there a workaround/current doc about this? Any help is appreciated

    Thanks

    0

Recent Posts

in General Discussion at YDN