2

How to connect a local JSON file correctly? And does EasyAutocomplete work with a local JSON file? For example, this code does not work:

var options = {
  url: "../Desktop/res/countries.json",
  getValue: "name",
};

$("#provider").easyAutocomplete(options);

All the other examples I used didn't work either.

supersize
  • 13,764
  • 18
  • 74
  • 133
pronect
  • 35
  • 6
  • 2
    you can't access local files from a browser, for security reasons. It will try to fetch it from the webserver which the page was served from. If you served the page over file:/// it almost certainly won't work at all. Use a webserver to test over http:// instead. – ADyson Nov 22 '17 at 21:12

0 Answers0