Advertisement
Temporelucis

Example

Jun 28th, 2015
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2.     <head>
  3.         <title>EXAMPLE</title>
  4.     </head>
  5.     <body>
  6.     </body>
  7.     <script src="util.js" type="text/javascript"></script>
  8.     <script src="statRequest.js" type="text/javascript"></script>
  9.     <script src="statParser.js" type="text/javascript"></script>
  10.     <script>
  11.         stats = new statisticsRequest("ou", "1825");
  12.         stats.setHandleDownloadComplete("downloadComplete()");
  13.         stats.downloadStatistics();
  14.        
  15.         function downloadComplete () {
  16.             pokemonStats = new pokemonStatistics(stats["stats"], "infernape");
  17.             pokemonStats.setHandleDone("done()");
  18.             pokemonStats.parseStatistics();
  19.         }
  20.        
  21.         function done() {
  22.             alert(pokemonStats["pokemonName"]);
  23.             alert(pokemonStats["abilitiesArray"]["abilities"][0] + " - " + pokemonStats["abilitiesArray"]["percentage"][0]);
  24.             alert(pokemonStats["abilitiesArray"]["abilities"][1] + " - " + pokemonStats["abilitiesArray"]["percentage"][1]);
  25.             //You get the point
  26.         }
  27.     </script>
  28. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement