Many parent windows affect values in one child window

Dear all,
    How can I have more than one parent window to affect a child window. I plan to have hyperlink in parent window, which when click on can transfer values into the child window. Can I have cases where i have more than one parent window with hyperlinks in it, and no matter which parent window I click, the values will eventually be transfer into the child window???
  Can this be done?

Regards,
Aiya
aiyaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Timbo87Commented:
I set up a test and it looks like the popup window is relative to the parent window that opened it. Therefore a child window popped up from a parent cannot be modified by another non-parent window.
0
GwynforWebCommented:
If the 2 parent windows are in a frame set then they can both communicate with the popup cretad by one of the windows, is this wht you want.? If the windows are entirely different browser windows then it can not be done unless I believe if you use activeX.

If you have 2 frames named frame1 and frame2 and in frame1 the commoand

win=window.open(''"","","")

then from frame2 you can write to the popoup for instance with

parent.frame1.win.document.write("hi this is from frame 2 ")
0
Timbo87Commented:
Gwyn's solution works if they're in the same frameset. For my test I assumed they were two completely different browser windows.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

GwynforWebCommented:
This is not going to happen with different browser instances (unless you write some compex activex stuff) but if the parent windows are going to be in the same browser instance it is possible using a hidden frame. I am not sure what you are looking for.
0
GwynforWebCommented:
ie if say a.htm opens a popup and has a link to b.htm or c.htm then it is possible for b.htm or c.htm to communicate with the popup. Is this what you want ?
0
aiyaAuthor Commented:
okie, the current sounds more like my case... Actually, I have a list of htm that will link to this child window, so watever hyperlinks that I click in the parent window, i want the parent window information to be passed into the child window. How can I go about doing? Can u give me an example? Thanks alot!!! =)
0
NetGrooveCommented:
Here my answer: it is possible.

To take Gwin's mnemonic, if you have parents a.htm, b.htm, c.htm,  and one of the opens a popup p.htm, then can every of the parents get access to the popup like this:

a.htm opens the popup:

   window.open('p.htm','popname',height=100,width=100');


The others two, and also the a.htm, can regain the access to popup like this:

   pw = window.open('','popname');
   
The common factor is the window name assigned to the popup.

By the way, in the same manner can also the popup comunicate to any of the parents.
Before the popup can access any of them parent needs the apropriate parent to have a window name.
Window name is a global attribute and can be set like this:

window.name = "Parent1";

So the popup can acces parent one like this:
  p1 = window.open('', "Parent1");

Now can the popup resuse all the object from "Parent1", like form fields, functions, global vars, and so on.




0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.