Team:TU-Delft/SynBioData
From 2013.igem.org
(Difference between revisions)
Line 1: | Line 1: | ||
<html> | <html> | ||
- | < | + | <head> |
- | + | <meta charset="UTF-8"> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | <title>Results</title> | |
- | + | ||
- | + | <link href="/apis/fusiontables/docs/samples/style/default.css" | |
- | + | rel="stylesheet" type="text/css"> | |
- | + | <script type="text/javascript" src="http://www.google.com/jsapi"></script> | |
+ | <script type="text/javascript"> | ||
+ | google.load('visualization', '1', { packages: ['table'] }); | ||
- | function | + | function drawTable() { |
- | + | var query = "SELECT 'Scoring Team' as Scoring, " + | |
- | + | "'Receiving Team' as Receiving, 'Minute of goal' as Minute " + | |
- | + | 'FROM 1VlPiBCkYt_Vio-JT3UwM-U__APurJvPb6ZEJPg'; | |
- | + | var team = document.getElementById('team').value; | |
+ | if (team) { | ||
+ | query += " WHERE 'Scoring Team' = '" + team + "'"; | ||
+ | } | ||
+ | var queryText = encodeURIComponent(query); | ||
+ | var gvizQuery = new google.visualization.Query( | ||
+ | 'https://docs.google.com/spreadsheet/ccc?key=0ArsDNt8sj-LBdEdCREdxUTFmVXpPaTVnZm43d0RTdmc'); | ||
- | + | gvizQuery.send(function(response) { | |
- | + | var table = new google.visualization.Table( | |
- | + | document.getElementById('visualization')); | |
- | </script> | + | table.draw(response.getDataTable(), { |
+ | showRowNumber: true | ||
+ | }); | ||
+ | }); | ||
+ | } | ||
+ | |||
+ | google.setOnLoadCallback(drawTable); | ||
+ | </script> | ||
+ | </head> | ||
+ | <body> | ||
+ | <div> | ||
+ | <label>Scoring Team:</label> | ||
+ | <select id="team" onchange="drawTable();"> | ||
+ | <option value="">All</option> | ||
+ | <option value="Germany">Germany</option> | ||
+ | <option value="New Zealand">New Zealand</option> | ||
+ | <option value="Uruguay">Uruguay</option> | ||
+ | </select> | ||
+ | </div> | ||
+ | <div id="visualization"></div> | ||
+ | </body> | ||
</html> | </html> |
Revision as of 12:15, 2 September 2013