Facing problem in getJSON
Thanks in Advance.
I am trying to load JSON file from SharePoint site with url
$.fn.AddPeriod = function (param) {
var $this = $(this);
var options = $.extend({}, $.fn.kpiIndicator.AddPeriod, param);
// var url = '/_layouts/UADemo1/Datafile/period.json';
var url = 'http://ddc4-l-6qpnvs1/sites/UpstreamDemoCollection/SiteAssets/Period.json&callback="';
$.getJSON( url, function (data)
{
// traverse all nodes
$.each(data, function (key, val) {
$.each(val, function (key1, val1) {
$.each(val1, function (i, item) {
var op = new Option(item.toString(), item.toString());
$this.append(op);
});
});
});
m_Period = $this.val();
LoadYear();
});
};
})(jQuery);
Please help me , how to resolve it and how to get error back from this function. The Problem is getJSON function does not call callback function. It just does not do anything.
Regards,