I have a page with a form. When an user fills the forms and submits it, it runs a js code. I would like that code to make changes to my other webpage. Specifically to add submitted data to a table that is on the second page. Reading the data is no problem, but is there a way to inject them elsewhere?
Let's say I have code like this:
const val1="val1";
const val2="val2";
And I would like to enter these value to table on another page.
var table = document.getElementById("myTable");
var row = table.insertRow(0);
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
cell1.innerHTML = val1;
cell2.innerHTML = val2;
But I do not know how to reference that other webpage.
Also, I am very new to website development. Is there an easier way to store just a little bit of data? I have only a basic hosting, I am not sure if database is part of it.