How to pass a value from a parent window to another html page using javascript?
I have 2 windows home.html and result.html . In home.html I have a <textarea> #txtinput and a <button> #btn . In result.html I have another <textarea> #txtresult . On home.html , if I enter a value into #txtinput and click #btn , I want to open result.html and pass the value of #txtinput into #txtresult . I've tried the below code from another post, which displays the value in the new window's body but won't display it in my element var myWindow = window.open(); myWindow.document.body.innerHTML = document.getElementById("txtinput").value; Is it somehow possible in a simple way? I am relatively