I have a homepage with a list of puzzles as links, and then each individual puzzle has its own webpage. Upon entering the correct password on a puzzle page, I would like a) a window alert to appear confirming that the password was correct, b) to add the link to the next puzzle to the homepage, and c) redirect to the homepage.
I've got the window alert and redirect down, I just don't know how (or if it's even possible) to make alterations to the homepage in this situation.
Currently that if statement looks like this:
if (this.document.login.pass.value == password) {
window.alert("Correct password.");
top.location.href="home.html";
}
Previously they just had the password form on the homepage, and of course that worked just fine, where content1 is the link we wanted to add to the page.
if (input == password1) {
var x = document.getElementById("content1");
x.style.display = "block";
Is it possible to accomplish this from another page? I'm working with someone else's code and I'm a little lost, so thanks for any help.