gucciburg
4/17/2017 - 3:31 PM

[JSON and AJAX example] example of AJAX javascript code #tags: AJAX, JSON

[JSON and AJAX example] example of AJAX javascript code #tags: AJAX, JSON

var ourRequest = new XMLHttpRequest();
ourRequest.open('GET', 'www.json-url.com');
ourRequest.onload = function(){
	var ourData = JSON.parse(ourRequest.responseText);
};

AJAX notes

  • Asynchronous
  • JavaScript
  • And
  • XML (or JSON)

Allows for on-the-fly access to data