Upload files to "js"
This commit is contained in:
parent
e6183a48e2
commit
c3c46a7209
|
@ -5,9 +5,10 @@ const selectedOption = params.get('selectedOption');
|
|||
console.log(palina, targetID, selectedOption);
|
||||
|
||||
// Esempio URL backend che ritorna JSON { linea, destinazione, veicolo, soppressa }
|
||||
const urlBackend = `http://URL-API/?param=${targetID}¶m2=${selectedOption}&palina=${palina}`;
|
||||
const urlBackend = `https://api.vichingo455.freeddns.org/start-fermatebus.json/?param=${targetID}¶m2=${selectedOption}&palina=${palina}`;
|
||||
|
||||
fetch(urlBackend)
|
||||
function caricadati(){
|
||||
fetch(urlBackend)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
const container = document.getElementById('tabella-container');
|
||||
|
@ -56,3 +57,8 @@ fetch(urlBackend)
|
|||
console.error('Errore nel caricamento dati:', err);
|
||||
document.getElementById('tabella-container').textContent = 'Errore nel caricamento dati.';
|
||||
});
|
||||
}
|
||||
|
||||
caricadati();
|
||||
|
||||
setInterval(caricadati, 60000);
|
Loading…
Reference in New Issue