By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,784 Members | 1,188 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,784 IT Pros & Developers. It's quick & easy.

communicate between iframes on different subdomains

P: n/a
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

Nov 17 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a
VK

Kenny Lai wrote:
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.

Nov 17 '06 #2

P: n/a
awesome. that will work. thanks.

-Kenny

VK wrote:
Kenny Lai wrote:
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.
Nov 17 '06 #3

P: n/a
VK said the following on 11/17/2006 10:38 AM:
Kenny Lai wrote:
>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.
That's why we don't place a whole lot of faith in what you know.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 17 '06 #4

P: n/a
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)

Nov 17 '06 #5

P: n/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/

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Nov 17 '06 #6

P: n/a
VK said the following on 11/17/2006 1:48 PM:
>>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..."
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.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 17 '06 #7

P: n/a
VK

Randy Webb wrote:
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 :-)
<http://groups.google.com/group/comp.lang.javascript/msg/2cadc7870c500457>
But at that time it was IE-only extension.
>A simple search for it
will lead you here:

<URL: http://www.mozilla.org/projects/security/components/same-origin.html>
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?

Nov 17 '06 #8

P: n/a
VK wrote:
>
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

Nov 17 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.