pis #2
@ -36,14 +36,14 @@ async function insertData(json) {
|
|||||||
for(var i = 0; i < json.length; i++) { // Hopefully can style output with CSS
|
for(var i = 0; i < json.length; i++) { // Hopefully can style output with CSS
|
||||||
tableData += `<tr><td class="pis-code">${json[i]['code']}</td>
|
tableData += `<tr><td class="pis-code">${json[i]['code']}</td>
|
||||||
<td class="station">${json[i]['stops'].join(', ')}</td></tr>`
|
<td class="station">${json[i]['stops'].join(', ')}</td></tr>`
|
||||||
|
log(`Count prior to incrementing: ${results}`)
|
||||||
results++
|
results++
|
||||||
|
log(`Count after incrementing: ${results}`)
|
||||||
}
|
}
|
||||||
tableData += "</table>"
|
tableData += "</table>"
|
||||||
div.insertAdjacentHTML("beforeend", tableData)
|
div.insertAdjacentHTML("beforeend", tableData)
|
||||||
if (results > 1) {
|
|
||||||
document.getElementById('result-count').textContent = results.toString()
|
document.getElementById('result-count').textContent = results.toString()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
async function noData() {
|
async function noData() {
|
||||||
const msg = '<p id="result-table">No results found</p>'
|
const msg = '<p id="result-table">No results found</p>'
|
||||||
|
@ -13,6 +13,14 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
td, th {
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
#reset {
|
||||||
|
margin-top: 25px
|
||||||
|
}
|
||||||
|
|
||||||
#reset {
|
#reset {
|
||||||
margin-top: 25px;
|
margin-top: 25px;
|
||||||
}
|
}
|
||||||
@ -23,5 +31,7 @@
|
|||||||
|
|
||||||
.station {
|
.station {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
overflow-wrap:anywhere
|
overflow-wrap: anywhere;
|
||||||
|
font-family: firamono, monospace;
|
||||||
|
line-height: 1.2;
|
||||||
}
|
}
|
Reference in New Issue
Block a user