diff --git a/scripts/haltestellen.js b/scripts/haltestellen.js index cd979e8..e2b1a45 100644 --- a/scripts/haltestellen.js +++ b/scripts/haltestellen.js @@ -55,6 +55,9 @@ function ajaxCall(dataUrl, outputElement, callback) { console.log("anonymous function"); + var wurst = [["13","Prohlis","754"],["13","Prohlis","754"],["13","Prohlis","754"],["13","Prohlis","754"]]; + console.log(wurst.length); + // get the search form var searchForm = document.getElementById("search-form"); @@ -75,9 +78,26 @@ function ajaxCall(dataUrl, outputElement, callback) { ajaxCall(hstUrl, target, function(data) { - target.innerHTML = ""; - - target.innerHTML = "
" + data + "
"; + var i; + var y; + var dataLength = data.length; + + target.innerHTML = "Linie | "; + target.innerHTML += "Richtung | "; + target.innerHTML += "Abfahrt | "; + target.innerHTML += "
---|---|---|
" + data[i][y] + " | "; + } + target.innerHTML += "