console.log('main.js loaded'); async function update() { const response = await fetch('http://127.0.0.1/api/getzones.php', { method: 'GET', }); console.log(response); const content = await response.json(); // loop le result // update menu with key // loop value // update table with value } window.onload = () => { update(); };