jquery - javascript not working from network drive -


i'm trying run below file. runs fine when run on local drive if place on network drive no longer works. idea why might be?

the below code trying run. using pivottable here: https://github.com/nicolaskruchten/pivottable.

<!doctype html> <html> <head>     <title> demo</title>     <!-- external libs cdnjs -->     <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>     <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>      <!-- pivottable.js libs ../dist -->     <link rel="stylesheet" type="text/css" href="../dist/pivot.css">     <script type="text/javascript" src="../dist/pivot.js"></script>     <style>         body {font-family: verdana;}     </style>      <!-- optional: mobile support jqueryui-touch-punch -->     <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js"></script>    </head> <body>     <script type="text/javascript"> // example shows custom aggregators using    $(function(){     var tpl = $.pivotutilities.aggregatortemplates;      $.getjson("col.json", function(frontier) {         $("#output").pivotui(frontier, {             rows: ["manager"], cols: ["sector"],             aggregators: {                 "number of positions":      function() { return tpl.count()() },                 "manager weight": function() { return tpl.sum()(["port"])},                 "benchmark xgcc weight": function() { return tpl.sum()(["bench"])},             }         });     });  });     </script>        <div id="output" style="margin: 30px;"></div>  </body> </html> 

file:/// urls run in different context http/https , other contexts (internal, public, private, unsafe). limitations in question depend on specific browser, os , context itself.

if must execute javascript within html, safest , assured way run have running via web server.


also worth noting, there few local/relative files. ../dist/pivot.js , ../dist/pivot.css sure you're saving files, , in correct relative path well?


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -