Cross-subdomain javascripting.

C

Connell

Hi,
I have two subdomains, say A.domain.tld and B.domain.tld.
I have put an html file on A which opens an iframe of a page from B.
Is there any way that I can specify (in either file) that I want the
page on B to be able to call functions on the A page (which, to my
knowledge so far is impossible due to the security restrictions
browsers place on the DOM).
As in I want to be able to say on A "let pages from B call my
functions".
And then on B say "parent.somefunction();"

Thanks
Connell
 
M

Martin Honnen

Connell wrote:

I have two subdomains, say A.domain.tld and B.domain.tld.
I have put an html file on A which opens an iframe of a page from B.
Is there any way that I can specify (in either file) that I want the
page on B to be able to call functions on the A page (which, to my
knowledge so far is impossible due to the security restrictions
browsers place on the DOM).
As in I want to be able to say on A "let pages from B call my
functions".
And then on B say "parent.somefunction();"

If both documents set the property
document.domain = 'domain.tld'
then access across subdomains of that domain should be allowed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top