Upload files to "js"

This commit is contained in:
daniele 2025-06-24 08:52:30 +00:00
parent e6183a48e2
commit c3c46a7209
1 changed files with 9 additions and 3 deletions

View File

@ -5,8 +5,9 @@ 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}&param2=${selectedOption}&palina=${palina}`;
const urlBackend = `https://api.vichingo455.freeddns.org/start-fermatebus.json/?param=${targetID}&param2=${selectedOption}&palina=${palina}`;
function caricadati(){
fetch(urlBackend)
.then(res => res.json())
.then(data => {
@ -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);