I have an HTML5 page where I store some data with:
window.sessionStorage.setItem('toStore', 'hello world');
Then, I open from this window a pop-up one with:
window.open('mobile.html', 'myPopUp');
I have a set of Javascript functions associated to the two pages, where I want to access the local storage data of parent page from the popUp with the getItem('toStore') call.
Is that possible? If yes, what's the calling syntax?
Thanks
Converting comment to answer.
window.opener.sessionStorage.setItem('toStore', 'hello world');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With