add cancel button listener

This commit is contained in:
Arthur Lu 2022-12-20 15:42:13 -08:00
parent e31c91679f
commit 85f7fac100

View File

@ -13,6 +13,11 @@ async function init () {
let type = uriData.type; let type = uriData.type;
let vmid = uriData.vmid; let vmid = uriData.vmid;
await populateForm(node, type, vmid); await populateForm(node, type, vmid);
let cancelButton = document.querySelector("#cancel");
cancelButton.addEventListener("click", () => {
goToPage("index.html");
});
} }
async function populateForm (node, type, vmid) { async function populateForm (node, type, vmid) {