I am trying to load a d3js script using
$.getScript('http://d3js.org/d3.v2.js', function(data, textStatus) { console.log(textStatus); return true });
which correctly returns the success status.
I have already installed
$.ajaxSetup({ cache: true, async: false });
so that the file fully loads before trying to use it.
But I get "TypeError: names.map (...). Join is not a function" in my console window.
Has anyone encountered such a situation? Is there anything special I need to do to download the file correctly?
I also tried
var se = document.createElement('script'); se.type = "text/javascript"; se.src = "http://d3js.org/d3.v2.js"; document.getElementsByTagName('head')[0].appendChild(se);
with the same results.
I have no problem with
<script src="http://d3js.org/d3.v2.js"></script>
but in this application this is not an option.
source share