Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>EXAMPLE</title>
- </head>
- <body>
- </body>
- <script src="util.js" type="text/javascript"></script>
- <script src="statRequest.js" type="text/javascript"></script>
- <script src="statParser.js" type="text/javascript"></script>
- <script>
- stats = new statisticsRequest("ou", "1825");
- stats.setHandleDownloadComplete("downloadComplete()");
- stats.downloadStatistics();
- function downloadComplete () {
- pokemonStats = new pokemonStatistics(stats["stats"], "infernape");
- pokemonStats.setHandleDone("done()");
- pokemonStats.parseStatistics();
- }
- function done() {
- alert(pokemonStats["pokemonName"]);
- alert(pokemonStats["abilitiesArray"]["abilities"][0] + " - " + pokemonStats["abilitiesArray"]["percentage"][0]);
- alert(pokemonStats["abilitiesArray"]["abilities"][1] + " - " + pokemonStats["abilitiesArray"]["percentage"][1]);
- //You get the point
- }
- </script>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement