I'm trying to load data from an external .js
file, containing a json representation of a bunch of data. I cannot for the life of me figure out how to access the data inside the page. I'm sure this is really easy and I'm missing something simple! right now, I'm trying this:
$(document).ready(function(){
$.getJSON("http://api.crunchbase.com/v/1/company/xobni.js",
function(data){
alert(data.company_url);
});
});
...which is obviously very wrong, since nothing happens. I've tried loading it in a <script>
tag, but firebug tells me it didn't even load. how could I screw that up? anyway, I'm about ready to pull my hair out, and I figure this will take someone else about 15 seconds to figure out.