how do i set a js global variable to a json result set in the onload event?
var global = [];
$.getJSON("<%: Url.Action("myUrl", "con") %>/",
function(data) {
$.each(data, function(key, val) {
global.push(val);
});
});
global does not have a value set on load, i need to access it outside the json call…
You again. Maybe try