Commit
This commit is contained in:
parent
b0e23a9d61
commit
e69aaeb720
@ -1,8 +1,12 @@
|
|||||||
<h1>Live resultater</h1>
|
<h1>Live resultater</h1>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div id="ranking-table">
|
<noscript>
|
||||||
|
Denne siden krever JavaScript
|
||||||
|
</noscript>
|
||||||
|
|
||||||
|
<div id="ranking-table">
|
||||||
|
Laster inn...
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -44,12 +48,14 @@ async function updateTable()
|
|||||||
table_html += "<tr>";
|
table_html += "<tr>";
|
||||||
table_html += "<td>" + element.name + "</td>";
|
table_html += "<td>" + element.name + "</td>";
|
||||||
table_html += "<td>" + element.rounds + "</td>";
|
table_html += "<td>" + element.rounds + "</td>";
|
||||||
table_html += "<td>" + element.bestTime + "</td>";
|
table_html += "<td>" + element.date + "</td>";
|
||||||
table_html += "</tr>";
|
table_html += "</tr>";
|
||||||
});
|
});
|
||||||
|
|
||||||
table_html += "<table>";
|
table_html += "<table>";
|
||||||
|
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
document.getElementById("ranking-table").innerHTML = table_html;
|
document.getElementById("ranking-table").innerHTML = table_html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,8 @@ foreach ($times as $time)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$row = [
|
$row = [
|
||||||
"name" => $team->name,
|
"name" => $team->name,
|
||||||
"rounds" => $team->rounds,
|
"date" => $time->date
|
||||||
"bestTime" => $team->bestTime
|
|
||||||
];
|
];
|
||||||
|
|
||||||
array_push($data, $row);
|
array_push($data, $row);
|
||||||
|
Reference in New Issue
Block a user