I have following scripts:
function PostChartValues(meter_id, range_type_id, start_date, end_date) {
$.ajax({
url: '@Url.Action("GetMeterReadingsTimeSeries", "Widget")',
type: 'POST',
data: { MeterType: meter_id, DateRangeType: range_type_id, StartDate: start_date, EndDate: end_date },
beforeSend: function () {
$("#chart_loading_div").show();
},
complete: function () {
$("#chart_loading_div").fadeOut();
},
success: function (result) {
$("#chart").html(result);
},
error: function (result) {
alert("Seçilen kritere uygun veri bulunamadı!");
}
}); //end ajax
} //end PostChartValues
code is working. But When I receive an external .js file above code, I get the error that I wrote in the title.
Why do I get this?