mirror of
https://github.com/Daniongithub/ER-TPL.git
synced 2025-12-06 15:22:02 +00:00
Link alla mappa compare comunque
This commit is contained in:
@@ -16,11 +16,13 @@ fetch(urlDesc)
|
|||||||
return response.json();
|
return response.json();
|
||||||
})
|
})
|
||||||
.then(data =>{
|
.then(data =>{
|
||||||
|
linkContainer.innerHTML=`<a href="iframeorari.html?routenum=${data[0].linea}" class="biancosott">Visualizza tabella e mappa</a>`;
|
||||||
descContainer.innerHTML=`
|
descContainer.innerHTML=`
|
||||||
<table id="desc-table">
|
<table id="desc-table">
|
||||||
<th>Destinazione</th>
|
<th>Destinazione</th>
|
||||||
<th>Tempo di percorrenza</th>
|
<th>Tempo di percorrenza (min)</th>
|
||||||
<th>Frequenza</th>
|
<th>Frequenza (min)</th>
|
||||||
|
<th>Sabato dopo le 14 e domenica (min)</th>
|
||||||
</table>`;
|
</table>`;
|
||||||
const table = document.getElementById('desc-table');
|
const table = document.getElementById('desc-table');
|
||||||
if(data[0].linea==undefined){
|
if(data[0].linea==undefined){
|
||||||
@@ -38,9 +40,11 @@ fetch(urlDesc)
|
|||||||
var td = document.createElement('td');
|
var td = document.createElement('td');
|
||||||
td.innerHTML=data[0].frequenze[i];
|
td.innerHTML=data[0].frequenze[i];
|
||||||
tr.appendChild(td);
|
tr.appendChild(td);
|
||||||
|
var td = document.createElement('td');
|
||||||
|
td.innerHTML=data[0].frequenze_dom[i];
|
||||||
|
tr.appendChild(td);
|
||||||
table.appendChild(tr);
|
table.appendChild(tr);
|
||||||
i++;
|
i++;
|
||||||
});
|
});
|
||||||
linkContainer.innerHTML=`<a href="iframeorari.html?routenum=${data[0].linea}" class="biancosott">Visualizza tabella e mappa</a>`;
|
|
||||||
})
|
})
|
||||||
.catch(error => {descContainer.innerHTML="La linea specificata non possiede nessuna descrizione valida.";console.error(error);})
|
.catch(error => {descContainer.innerHTML="La linea specificata non possiede nessuna descrizione valida.";console.error(error);})
|
||||||
Reference in New Issue
Block a user