communicate between iframes on different subdomains

K

Kenny Lai

hey,
Is there a way to communicate between iframes on different subdomains?
e.g. from one.dot.com to two.dot.com? there is a security access
restriction passing javascript commands between subdomains that we've
run into.

-Kenny
 
V

VK

Kenny said:
hey,
Is there a way to communicate between iframes on different subdomains?
e.g. from one.dot.com to two.dot.com?

AFAIK only for Internet Explorer. For that each envolved page
(including the one hosting iframes) has to execute JavaScript command
document.domain = "dot.com";
before the first attempt of cross-subdomain communication.
 
K

Kenny Lai

awesome. that will work. thanks.

-Kenny
AFAIK only for Internet Explorer. For that each envolved page
(including the one hosting iframes) has to execute JavaScript command
document.domain = "dot.com";
before the first attempt of cross-subdomain communication.
 
V

VK

AFAIK only for Internet Explorer.
That's why we don't place a whole lot of faith in what you know.

Please quote properly the post you are commenting on. "AFAIK..."
sentense was the beginning of the solution I proposed and w/o it the
sentense has no sense.
If you know other UA's implementing IE's document.domain mechanics that
would be helpful to know to everyone. I'm not denying the possibility
of these UA's, I simply don't know of them (AFAIK - As Far As I Know)
 
A

ASM

Kenny Lai a écrit :
hey,
Is there a way to communicate between iframes on different subdomains?
e.g. from one.dot.com to two.dot.com? there is a security access
restriction passing javascript commands between subdomains that we've
run into.

dot.com/one/
dot.com/two/
 
R

Randy Webb

VK said the following on 11/17/2006 1:48 PM:
Please quote properly the post you are commenting on. "AFAIK..."

That coming from someone who can't quote me properly and give proper
attribution? Who wrote the above? Only by looking at other articles can
anybody know.

My response was directed - directly - at your "AFAIK". document.domain
is a very well known about issue in this group. A simple search for it
will lead you here:

<URL: http://www.mozilla.org/projects/security/components/same-origin.html>

So, your AFAIK doesn't mean a whole lot and leads to "why we don't place
of whole lot of faith in what you know" as your record speaks for itself.
sentense was the beginning of the solution I proposed and w/o it the
sentense has no sense.

Sure it does, just not to you.
If you know other UA's implementing IE's document.domain mechanics that
would be helpful to know to everyone.

See above.
 
V

VK

Randy said:
My response was directed - directly - at your "AFAIK". document.domain
is a very well known about issue in this group.

Sure it is: after I brought it here back in 2003 :)

This is a useful link and this is really all you had to post on the
first plase instead of playing some games of a kind "I know something
cool but I will not tell anyone". For a technical newsgroup it is not
an appropriate style IMHO.

As it's listed on Mozilla Projects section, it is also would be useful
to find if it's also documented on MDC, if it was ever implemented and
if implemented then from what version.

Also if Mozilla went for adopting this IE feature then it could be
expected that some other UA did the same.

Does anyone have some comparison stidies done on document.domain
support?
 
P

Peter Michaux

VK said:
Does anyone have some comparison stidies done on document.domain
support?

I just put

javascript:alert(document.domain);

in the URL bar of

IE 5
IE 6
Safari 2
Opera 6
Opera 9
Netscape 6
Firefox 1.5

All these browser reported the correct domain.

I have also used document.domain to allow cross subdomain Ajax on a
site with 10,000 users and no one has complained so a variety of
popular browser can use document.domain as expected.

Peter
 

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,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top