Cross-subdomain javascripting.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Connell

    #1

    Cross-subdomain javascripting.

    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.somefun ction();"

    Thanks
    Connell

  • Martin Honnen

    #2
    Re: Cross-subdomain javascripting.



    Connell wrote:

    [color=blue]
    > 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.somefun ction();"[/color]

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

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/

    Comment

    Working...