diff --git a/js/pis.js b/js/pis.js index 6c46e5c..dd7ffca 100644 --- a/js/pis.js +++ b/js/pis.js @@ -9,7 +9,7 @@ async function findByOrigDest() { if (json == false) { await noData() } else { - await displayData(json) + await insertData(json) } document.getElementById('crs-box').style = 'display:none' document.getElementById('result-box').style = 'display:block' @@ -22,23 +22,24 @@ async function fetchOrigDest() { return {origin: orig, destination: dest} } -async function displayData(json) { +async function insertData(json) { // Receives the JSON Respose ([{},{}]) containing one or more possible // PIS codes. Display the code and the stops with a method of scrolling between them. // Maybe as a table or a carousel? const div = document.getElementById('result-box') const tableHtml = `
Code | -Stations | -
---|