How to communicate between frames?
Posted
by bangoker
on Stack Overflow
See other posts from Stack Overflow
or by bangoker
Published on 2010-04-02T23:56:38Z
Indexed on
2010/04/03
0:03 UTC
Read the original article
Hit count: 306
I'm maintaining an application that goes sort of like this:
There is a Page A with a Frame that shows Page B. Now page B is part of a completely different product, so there's a frame in a that just calls B.
Now, they want that when B an option in B is clicked, the WHOLE page is redirected to another page in A. The problem is that the url of A is something like "www.client.MyCompany/Order/Details/123"
But B doesnt know nothing about A, or which order # it is or anything, but Page A who has the frame B does know it.
For know my solution is to just redirect to all the order so something like client.MyCompany/Orders
but since B doesn't know which client it is, I'll add it in the webconfig. (so each client has its own webconfig with a different value).
I dont find this solution optimal but I can't think of anything else! I already tried putting the needed url in page A in a hidden Div (since A does know all the info) and then trying to read the whole DOM of the page from B to find it.... unfortunately I can only get access to Frame B's DOM... (I tried with jquery).
I know frames are evil, but this is how it is written... any ideas?
Thanks!
© Stack Overflow or respective owner