I want a form the can...
I want to make a form that changes another page based on what the user put in. For example I wanted to create a form which has the name, description(leave, vacation) and how many days leaving format. I want the form to only be true if the name is in a JavaScript array. Second I want the description to only show on the username selected in the team.html file. And lastly, I want it to be stored in localstorage and expire when the days run out. The thing I already understand is how to make the function to be true if the name is in the array. I'm having a problem sending the info to the desired name in the other page using the innerhtml and storing it and making it expire after the days described. And for it to remove the name if the description describes it as leave. Here is the code: File name: script.js function info(){ var names=Array["name1","name2","name3","name4"]; let id=0; let ff1=document.getElementById("ff1").value; let ff2=document.getElementById("ff2").value; for(let i=0; i>14;i++){ id++ if(ff1==names[i]){ break document.getElementById("h"+str(id)).innerHTML=ff2; } } } File:index.html <form id="form"> <label for="ff1">Name</label> <input type="text" id="ff1" required> <label for="ff2">Options</label> <select id="ff2" name="Description" required> <option class="option" value="Vacation">Vacation</option> <option class="option" value="Leave">Leave</option> </select> <label for="ff3">How Long?(In days)</label> <input type="numbers" id="ff3" required> <input type="submit" value="Submit" onclick="info()" id="info"> </form> File:team.html <li class="li"><img src="" alt="" class=""><p class="">Name1<p id="h0"></p></p></li> <li class="li"><img src="" alt="" class=""><p class="">Name2<p id="h1"></p></p></li> <li class="li"><img src="" alt="" class=""><p class="">Name3<p id="h2"></p></p></li