Last active
March 28, 2017 20:26
-
-
Save uladkasach/68cc04acf377091335fbff7b6a6603ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// generate list of values from list of objects's values for a key | |
var colors = events.map(function(a) {return a.color;}); | |
// add onload, instead of replace | |
window.addEventListener("load", function_reference); | |
// Async Request | |
var xhr = new XMLHttpRequest(); | |
xhr.open("POST", destination_path, true); | |
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); | |
xhr.onload = function(){ | |
console.log(this.responseText); | |
}; | |
xhr.send('arg1='+val1+'&arg2='+val2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment