Iframes and getting their current URL within Subdomain

R

RyanRitten

Hey all,

Quick question. My website is :

http://mywebsite:1234

and I load into an IFRAME this url :

http://anotherwebsite:2828

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
 
T

Thomas 'PointedEars' Lahn

RyanRitten said:
http://mywebsite:1234

and I load into an IFRAME this url :

http://anotherwebsite:2828

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
 
R

RyanRitten

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 :)
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top