I have jquery ajax call which will go to a .js
file and returns JSON
var validate = function () {
alert('test string');
}
$.ajax({
url: "JS/JQB/SampleData/Filters.js",
async:false,
success: InitailiseJQB
});
Filters.js file contains below JSON,
[{
"id": "Group",
"filters": [{
"id": "49be7d78-4dcf-38ab-3733-b4108701f1",
"validation": {
"callback": validate
}
}]
}]
in the above JSON validate is the javascript function
but the problem is when i am requesting for the JSON using ajax call, it is throwing run time error called JavaScript runtime error: Invalid character