I have a page called "k.html" which is in domain A. This page will be used as an iframe by pages "a.html" in domain B, domain C, domain D, domain E.
I want to set the parent location in this "k.html":
Domain B's "a.html" page to Domain B's "b.html" page
Domain C's "a.html" page to Domain C's "b.html" page
Domain D's "a.html" page to Domain D's "b.html" page
I have tried
window.top.location = Domain B + "b.html";
It works. But I don't want to hardcode the "Domain B" in this situation.
What should I do?