diff --git a/scripts/haltestellen.js b/scripts/haltestellen.js index 5158a93..18a389f 100644 --- a/scripts/haltestellen.js +++ b/scripts/haltestellen.js @@ -79,6 +79,7 @@ function ajaxCall(dataUrl, outputElement, callback, responseType) { // set the ajax server url dependent on the protocol // for strato ssl-proxy, we have to insert the 1st part of the url path serverUrl = window.location.protocol + "//" + window.location.hostname; + if (serverUrl.indexOf("https") === -1) { serverUrl += "/cgi-bin/"; } else { @@ -146,17 +147,25 @@ function ajaxCall(dataUrl, outputElement, callback, responseType) { // generate table entries for (i = 0; i < dataLength; i++) { + htmlOutput += "
unbekannte Haltstelle, bitte erneut versuchen
"; + } else { // replace useless chars & split string into array @@ -217,6 +228,7 @@ function ajaxCall(dataUrl, outputElement, callback, responseType) { // generate table entries for (i = 0; i < dataLength; i++) { + htmlOutput += "