Skip to content
Snippets Groups Projects
Commit 202f331e authored by pkim62@illnois.edu's avatar pkim62@illnois.edu
Browse files

wow

parent 6cfc8e2e
Branches week2
No related tags found
No related merge requests found
......@@ -105,14 +105,13 @@ function test(querystring) {
champ_tier : champ.champ_tier
})
});
console.log(dict);
return dict;
addTable(dict)
}
})
}
function addTable(querystring) {
arr = test(querystring);
function addTable(arr2) {
arr = arr2
setTimeout(function(){
var myTableDiv = document.getElementById("myDynamicTable");
......@@ -128,7 +127,7 @@ function addTable(querystring) {
for (var j = 0; j < 4; j++) {
var td = document.createElement('TD');
td.width = '75';
td.appendChild(document.createTextNode(arr['0']['name']));
td.appendChild(document.createTextNode(arr[j]['name']));
tr.appendChild(td);
}
}
......
......@@ -16,7 +16,7 @@
<button type = "button" onclick="handleGetChamp(field.value)" style="height:50px; width:720px">Get Champ</button><br><br><br><br>
<label>Query (Ex : champion.win_rate: > 55):</label><br><br>
<input type="text" id="field2" name="wr" style="height:50px; width:712px"><br><br>
<button type = "button" onclick="addTable(field2.value)" style="height:50px; width:720px">Get Query</button><br><br><br><br>
<button type = "button" onclick="test(field2.value)" style="height:50px; width:720px">Get Query</button><br><br><br><br>
<button type = "button" onclick="clearValues()" style="height:50px; width:720px">Clear Results</button><br><br>
</form>
<table>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment