Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function fetchAndPopulate(dispFunc,params) {
- xhr=new XMLHttpRequest();
- xhr.open("GET",params.fetchURL);
- xhr.send(null);
- xhr.onreadystatechange=function(){
- if(xhr.readyState==4) {
- response=xhr.responseText;
- dispFunc(params,response);
- }
- }
- }
Add Comment
Please, Sign In to add comment