Reputation: 13614
I'm newer in web programming so maybe my question will seem naive to some of you, I need to pass data from parent window to child popup window.
I found in google only opposite examples(i.e passing data from child to parent).
I will appreciate if you could share with example, or short explanation.
Thank you in advance.
Upvotes: 0
Views: 4374
Reputation: 216
As long as the popup you open abides by the Same-Origin policy you have full access to the document. And then you can just do something like this:
var child = window.open('about:blank'),
something = document.createElement('div');
something.innerHTML = "<h2>Something!</h2>";
child.document.body.appendChild(something);
Upvotes: 1