I tried reading a local text file with Javascript(JQuery). With the following code.
$.ajax({
type: 'GET',
url: 'file:///C:/Users/kola/Desktop/b/data_file_text',
error: function(e)
{
console.log(e);
},
success: function(e)
{
console.log(e.responseText);
}
});
At the end of the execution, Error Method was triggered. Accessing the argument(e) returned. I Got the following Jquery Object.
readyState: 4
responseText: "My Expected Data"
status: 200
statusText: "OK"
....
Why will it triggered error and everything seems OK. Am I missing something? Thank you.