<!DOCTYPE html> <html lang="en" xmlns:CName="http://www.w3.org/1999/xhtml"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous"> <title>Title</title> <link rel="icon" type="image/x-icon" href="/pokemon/favicon.ico"> </head> <body> <script src="js/requests.js"></script> <script> tableParentId = "tableDiv"; detailsParentId = "detailsDiv"; fetch('/pokemon/api/trainers') .then(res => res.json()) .then(data => { trainerTypes = data; createTrainersTypesTable(); }) .catch(err => { console.error(`Unable to fetch trainers: ${err.status}`); console.error(err); }); </script> <h1>Go to main page</h1> <button onclick="window.location.href = 'http://localhost:8080/pokemon/'">Go to Pokemon Page</button> <h1>Trainers </h1> <div class="container"> <div class="row"> <div id="tableDiv" class="col-8">No data</div> <div id="detailsDiv" class="col-4">No data</div> </div> </div> <h1>Add a new trainer</h1> <form> <label for="charName">CName:</label> <input type="text" id="charName" name="charName"><br><br> <label for="charId">ID:</label> <input type="text" id ="charId" name="charId"> <br><br> <button onclick=addNewCharacter(charName,charId)> Add the new trainer today, at no cost!</button> </form> </body> </html>