All Time Greatest Albums
console.info('bdiv');
document.onreadystatechange = function(event) {
if (document.readyState === "complete") {
// code that runs when the readyState is set to complete
playBack();
}
};
function myFunction2() {
var input, filter, ul, li, i;
input = document.getElementById("myInput");
filter = input.value.toUpperCase();
console.log(filter);
ul = document.getElementsByClassName("pbItem"); //li = ul.getElementsByTagName("li"); var artist=""; var album=""; var rank=""; var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { var json = JSON.parse(this.responseText); var myResult="";
for (i = 0; i -1 ) { myResult+="
myResult += "
";
myResult += "
"; myResult += "
- ";
myResult+= "
- " + compareCountDowns(json[i].rank, json[i].rank2005) + "
-
* Released in " + json[i].releaseDate.substring(0, 4) + "
"; // myResult+= "
"; myResult += "
"; myResult += "
"; txtTweet= "#"+ json[i].rank + " on the XPN 2021 All-Time Greatest Albums is " + json[i].album + " by " +json[i].artist; // myResult+="
"; myResult+=`
`; myResult += `
`;
if ((json[i].albumStream != "") ){ myResult += "
"; } myResult+=`
`; myResult += "
"; myResult += "
";
//myResult+="
"; } else if (album.search(filter) == true ) { console.log("album"+album.search(filter)); // myResult+="
"; } else if (rank.search(filter) == true ){ // myResult+="
"; } else{
}
// console.log('filterLength='+filter.length); if (filter.length > 0 ){ document.getElementById('loadResult').style.display ="none"; document.getElementById('myScroll').style.display ="none"; document.getElementById('searchResult').style.display ="block"; } if (filter.length === 0){ document.getElementById('loadResult').style.display ="block"; document.getElementById('myScroll').style.display ="block"; document.getElementById('searchResult').style.display="none"; } } if ((myResult.length > 0)&& (myResult !== 'undefined')){ document.getElementById("searchResult").innerHTML = "
- " + myResult+ "
"; console.log(searchResult); }
}
};
xmlhttp.open("GET", "https://xpn.org/countdown/2021/json/2021AllTime.json", true); xmlhttp.send();
}
.........
