I have two HTML files, main.html, and export.html. I also have some ajax that I wrote. I would like to store data from main.html using localStorage and then put that data into a table on export.html. Then I would like to export this HTML in an email using flask-mail. The data from main.html is in an array, so I am saving it as follows:
localStorage.setItem("firstName", data[0]);
localStorage.setItem("lastName", data[1]);
I am using flask-mail to send an email to the user which contains export.html in it. In export.html, I have a script which looks like:
document.getElementById("firstName").innerHTML = localStorage.getItem("firstName");
document.getElementById("lastName").innerHTML = localStorage.getItem("lastName");
and I have a table with td tags with those ids mentioned above. When I send the email, I put the HTML into the email, but when I check it, there is no data in the table. How can I get the data to be displayed in the email?