crp Report post Posted February 9, 2012 Hi there, I'm trying to host the static javascript libraries on Amazon S3 and am encountering some issues with the autoloading. Here is the issue. When we include the main FusionCharts.js, the script attempts to load the file FusionCharts.HC.js but the path to FusionCharts.HC.js is incorrect resulting in a 404. For example, we load the main FusionCharts.js from our S3 bucket like this: <script type="text/javascript" language="javascript" src="http://assets.mydomain.org/js/FusionCharts.js"></script> This should be autoloading the following file <script type="text/javascript" language="javascript" src="http://assets.mydomain.org/js/FusionCharts.HC.js"></script> But instead attempts to load <script type="text/javascript" language="javascript" src="http://www.mydomain.org/page/http%3A%2F%2Fassets.mydomain.org%2Fjs%2FFusionCharts.HC.js "></script> Which obviously is malformed and does not exist (results in 404). I've peaked in the obfuscated FusionCharts.js and the error arises around line 36 where the construction of the path to the autoloaded library is created. I can't figure out a fix though as I'm not a javascript wiz. Any help would be much appreciated! By the way, I'm using version 3.2.2-servicerelease1.4200 Share this post Link to post Share on other sites
Guest Sumedh Report post Posted February 29, 2012 Hi, Can you please try by giving relative path for .js files? Share this post Link to post Share on other sites
cja Report post Posted March 14, 2013 Hi, I have this exact same issue. Specifically: - I have my FusionCharts files in an S3 bucket and load with a call like <script src="https://s3-eu-west-1.amazonaws.com/domain/html/charts/FusionCharts.js" type="text/javascript"></script> This loads correctly, however the auto-loader is trying to load FusionCharts.HC.js at http://www.domain.com/client/https://s3-eu-west-1.amazonaws.com/domain/html/charts/FusionCharts.HC.js'>http://www.domain.com/client/https://s3-eu-west-1.amazonaws.com/domain/html/charts/FusionCharts.HC.js Which, as the previous poster mentioned, is an invalid domain. My script is at http://www.domain.com and my FC files at https://s3-eu-west-1.amazonaws.com/domain/html/charts so I don't see how I can create a relative path for the js files. Am I missing something / is there a workaround? Thanks, Charles. Share this post Link to post Share on other sites
Swarnam Report post Posted March 19, 2013 Hi Charles, Can you please try loading all the JavaScript files explicitly? Ref. code:(Please add the files as below) <script language="JavaScript" src="https://s3-eu-west-1.amazonaws.com/domain/html/charts/jquery.min.js"></script>'>https://s3-eu-west-1.amazonaws.com/domain/html/charts/jquery.min.js"></script> <script language="JavaScript" src="https://s3-eu-west-1.amazonaws.com/domain/html/charts/ FusionCharts.js"></script> <script language="JavaScript" src="https://s3-eu-west-1.amazonaws.com/domain/html/charts/FusionCharts.HC.js"></script> <script language="JavaScript" src="https://s3-eu-west-1.amazonaws.com/domain/html/charts/FusionCharts.HC.Charts.js"></script> Hope this helps. Share this post Link to post Share on other sites
cja Report post Posted March 19, 2013 Hi Charles, Can you please try loading all the JavaScript files explicitly? Ref. code:(Please add the files as below) <script language="JavaScript" src="https://s3-eu-west-1.amazonaws.com/domain/html/charts/jquery.min.js"></script>'>https://s3-eu-west-1.amazonaws.com/domain/html/charts/jquery.min.js"></script> <script language="JavaScript" src="https://s3-eu-west-1.amazonaws.com/domain/html/charts/ FusionCharts.js"></script> <script language="JavaScript" src="https://s3-eu-west-1.amazonaws.com/domain/html/charts/FusionCharts.HC.js"></script> <script language="JavaScript" src="https://s3-eu-west-1.amazonaws.com/domain/html/charts/FusionCharts.HC.Charts.js"></script> Hope this helps. You are a star! That's cracked it. FYI, I also had to add the link to /FusionCharts.jqueryplugin.js. Many thanks, Charles. Share this post Link to post Share on other sites
Swarnam Report post Posted March 19, 2013 Hey Charles, Thanks and also glad to know your issue has been resolved. Share this post Link to post Share on other sites