Created
January 7, 2016 21:53
-
-
Save ConnorMcF/b42d8139cdf819990192 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-2.1.4.js"></script> | |
<meta charset="utf-8"> | |
<title>View Scores</title> | |
</head> | |
<body> | |
<h1>loading..</h1> | |
<script> | |
function checkscore(rank) { | |
$.get("http://hampus.connormcf.com/leaderboard/get.php?id="+rank) | |
.done(function( data ) { | |
var scoredata = data.split(','); | |
document.write("ID: "+scoredata[1]); | |
document.write("<br/>Score: "+scoredata[2]); | |
document.write("<br/>Date: "+scoredata[3]); | |
document.write("<br/><br/>"); | |
} | |
); | |
} | |
for (var i = 0; i < 5; i++) { | |
checkscore(i + 1); | |
} // check top five scores | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment