Home > OS >  Fetching and returning JSON files via AJAX, Javascript and HTML
Fetching and returning JSON files via AJAX, Javascript and HTML

Time:10-05

im just trying to post some open data information from a website onto an AJAX form using JS and HTML. But i cannot get it to work for the life of me...the open data source im using is from pic1

if anyone can see where im going wrong? i would greatly appreciate that. It seems like my event listener for my button isnt calling my fetch function or something...either that or it IS working...but something is not correct with my JS.

CodePudding user response:

Your function is called function fetch(){ within this function you call fetch(encodedURL) this will create a infinite recursion. Give your outer function another name and the error will be gone.

  • Related