diff --git a/scripts/haltestellen.js b/scripts/haltestellen.js
index 6d1925b..d1fb765 100644
--- a/scripts/haltestellen.js
+++ b/scripts/haltestellen.js
@@ -55,8 +55,7 @@ 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[0][0]);
+ //var wurst = [["13","Prohlis","754"],["13","Prohlis","754"],["13","Prohlis","754"],["13","Prohlis","754"]];
// get the search form
var searchForm = document.getElementById("search-form");
@@ -80,24 +79,28 @@ function ajaxCall(dataUrl, outputElement, callback) {
var i;
var y;
+ var htmlOutput;
var dataLength = data.length;
- target.innerHTML = "
";
- target.innerHTML += "";
- target.innerHTML += "Linie | ";
- target.innerHTML += "Richtung | ";
- target.innerHTML += "Abfahrt | ";
- target.innerHTML += "
";
+ htmlOutput = "";
+ htmlOutput += "";
+ htmlOutput += "Linie | ";
+ htmlOutput += "Richtung | ";
+ htmlOutput += "Abfahrt | ";
+ htmlOutput += "
";
for (i = 0; i < dataLength; i++) {
- target.innerHTML += "";
+ htmlOutput += "
";
for (y = 0; y < 3; y++) {
- target.innerHTML += "" + data[i][y] + " | ";
+ htmlOutput += "" + data[i][y] + " | ";
}
- target.innerHTML += "
";
+ htmlOutput += "";
}
- target.innerHTML += "
";
+ htmlOutput += "
";
+
+ // print table into web page
+ target.innerHTML = htmlOutput;
});
}
};