Iframes and getting their current URL within Subdomain

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

    Iframes and getting their current URL within Subdomain

    Hey all,

    Quick question. My website is :



    and I load into an IFRAME this url :



    As you might have noticed they are both on the same domain (just not
    fully qualified (ie. http://mywebsite.dmianname.com:1234)).

    How do i access the URL of the IFRAME? I keep getting access denied.
    I know I can't read the url of an IFRAME if the domains are
    different... but in this case aren't they the same?

    Thanks for any advice you can give.

    Ryan Ritten
  • Thomas 'PointedEars' Lahn

    #2
    Re: Iframes and getting their current URL within Subdomain

    RyanRitten wrote:

    >
    and I load into an IFRAME this url :
    >

    >
    As you might have noticed they are both on the same domain (just not
    fully qualified (ie. http://mywebsite.dmianname.com:1234)).
    >
    How do i access the URL of the IFRAME? I keep getting access denied.
    I know I can't read the url of an IFRAME if the domains are
    different... but in this case aren't they the same?
    The SOP does not consider DNS resolution. You have to use FQDNs instead,
    and set document.domain appropriately. Alternatively, you may use
    server-side URL rewrite so that it appears to the client that both resources
    are from the same domain.


    HTH

    PointedEars
    --
    realism: HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness: XHTML 1.1 as application/xhtml+xml
    -- Bjoern Hoehrmann

    Comment

    • RyanRitten

      #3
      Re: Iframes and getting their current URL within Subdomain

      On Jul 3, 1:33 am, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
      wrote:
      RyanRitten wrote:>
      and I load into an IFRAME this url :
      >>
      As you might have noticed they are both on the same domain (just not
      fully qualified (ie.http://mywebsite.dmianname.com:1234)).
      >
      How do i access the URL of the IFRAME?  I keep getting access denied.
      I know I can't read the url of an IFRAME if the domains are
      different... but in this case aren't they the same?
      >
      The SOP does not consider DNS resolution.  You have to use FQDNs instead,
      and set document.domain appropriately.  Alternatively, you may use
      server-side URL rewrite so that it appears to the client that both resources
      are from the same domain.
      >
      HTH
      >
      PointedEars
      --
          realism:    HTML 4.01 Strict
          evangelism: XHTML 1.0 Strict
          madness:    XHTML 1.1 as application/xhtml+xml
                                                          -- Bjoern Hoehrmann
      Helps a bunch. thanks man :)

      Comment

      Working...