I have multiple subdomains and sometimes i have situation to open main domain from sub-domain using window.open and close after doing certain operation.
While doing this activity I need to access javascript variable set on subdomain during page load from opened popup using window.opener.xxx but it says "security issue frame can not be accessed due to cross origin policy".
I tried document.domin = "maindomain.com"; on subdomain but it failed.
How to do it pls help me.
Thanks
You can pass this variable using querystring like, domain.com/page.html?variable=value and then you can parse that variable using javascript, like this: How can I get query string values in JavaScript?