Cross Domain (Friendly) Frame Scripting on IE 7

I

isspwk

I have a 2 domains that calls to each other via javascript window.open
method.
Each domain has a name given to its window. Domain A with Name A and
Domain B with Name B.
Domain A has 3 frames each with a name (header, content and footer
respectively)

Domain A will call Domain B via a pop up window (javascript) with Name
B and if the browser already has that window open, it will reload
(reuse) that window.

However, the design of Domain B is such that when Domain B calls
Domain A via a pop window, it uses the Name of a frame in Domain A
instead of the Domain A Name itself.

In IE6, i managed to have each domain calling the other correctly. The
number of windows created by each Domain is limited. That is the
behavior that we are trying to achieve.

However in IE7, when Domain B calls Domain A, it always open another
window instead of using the existing window in Domain A. Domain A
still calls Domain B correctly.

Are there any reasons for this behavior?
Is this a classic example of the cross domain scripting issue?

Currently, my solution would be to place domain B in Domain A frame,
so that Domain B is able to call Domain A via Domain A Frame. Hence
the windows are being reloaded (reused)
It is an appropriate solution?

Thanks in advance.
 
T

tomkat.user

I have a 2 domains that calls to each other via javascript window.open
method.
Each domain has a name given to its window. Domain A with Name A and
Domain B with Name B.
Domain A has 3 frames each with a name (header, content and footer
respectively)

Domain A will call Domain B via a pop up window (javascript) with Name
B and if the browser already has that window open, it will reload
(reuse) that window.

However, the design of Domain B is such that when Domain B calls
Domain A via a pop window, it uses the Name of a frame in Domain A
instead of the Domain A Name itself.

In IE6, i managed to have each domain calling the other correctly. The
number of windows created by each Domain is limited. That is the
behavior that we are trying to achieve.

However in IE7, when Domain B calls Domain A, it always open another
window instead of using the existing window in Domain A. Domain A
still calls Domain B correctly.

Are there any reasons for this behavior?
Is this a classic example of the cross domain scripting issue?

Currently, my solution would be to place domain B in Domain A frame,
so that Domain B is able to call Domain A via Domain A Frame. Hence
the windows are being reloaded (reused)
It is an appropriate solution?

Thanks in advance.

IE 7 defaults the cross navigation scripting to off.
if you turn it on (or prompt) it will work.
obviously that is not a prcatical solution.
Given the point of the security limitation, not sure there is a
solution. I have a similar issue and have not been able to figure
out. The frames though can navigate up i.e. any of them can navigate
the upper frames, but not a sub-frame from a different domain. Maybe
redirecting the top frame (with parameters to specify the locations of
the other frames).
I am curious if you have figured out a solution.
 
I

isspwk

Actually what i did was to:
1. Put Domain B url in Domain A Frame so that Domain B can access it.
2. When Domain B updates the URL in the Domain A's frame, it calls
upon Domain A URL.
So Domain A also has access to the Frame.
3. After Domain A has performed actions based on the URL's
instructions in the "common" frame, it updates the "common" frame's
URL back to Domain's B URL so that Domain B has access to the frame
again.

I Know its very tightly coupled but that is the best solution that i
can think off.
(ie Minimal Code Changes and Effort. Tradeoff: Future upgrades will be
much more difficult)
Hopefully, the application design will be changed in the future. (Eg.
Javascript Messaging?)
 

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,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top