I am using Eclipse Kepler IDE. I am unable to write the data in the local JSON file at the folder location JSON/a.json.
Here is my code given below.
$("#submitDetails").click(function(){
var newJSONData = {};
//alert("Function called");
projectID=$("#projectID").val();
managerID=$("#managerID").val();
pocId=$("#pocId").val();
comment=$("#comment").val();
newJSONData = [{
"Project" :projectID,
"ManagerID" :managerID,
"POC" :pocId,
"Comment":comment
}];
$.ajax
({
type: 'POST',
url: 'JSON/a.json',
data: newJSONData,
success: function () {alert("Project Submitted!"); },
failure: function() {alert("Error in project submission!");}
});
});