Click to See Complete Forum and Search --> : Affecting the original window


khayman2001
03-02-2003, 02:01 AM
The main thing I'm trying to do is get information from a user in a window I opened, and have that information appear in the original window, but I can't figure out how to give the original window a name so I can affect it.

I'm trying to create a Mad Libs area of my site, where a window opens, they input various parts of speech (Adjectives, nouns, verbs, etc. Basically all those things we never paid attention to in school.) And it then places their words into a story. They can be quite humorous. I originally had prompts popping up, and a separate definitions page open, but the definition page would blur when they clicked on the prompt, so I wanted a more solid approach.

Any help would be much appreciated.

Thanks,
Dan

khalidali63
03-02-2003, 07:07 AM
The link below should demonstrate a good deal of communication between parent and a child window.

http://68.145.35.86/skills/javascripts/ParentWinInteractionWithChildWin.html

Cheers

Khalid

khayman2001
03-02-2003, 12:23 PM
Thanks for that last bit, but now I can't figure out how to use that name that I just gave the opener to manipulate it. I'm using frames as well, so I tried this: institution is the name I gave the parent document, main is the frame I want to affect, and list is the name I gave the window I opened.


<a href="#" onClick="institution.main.document.writeln("This is what I do."); return false;">Do it.</a>

(That's not actually what I'll be using it for, but I figured I should get the names to work before doing something more complex.)

I put self.name = "institution"; in the parent head, var new_window = window.open("list.html", "list", "height=342, width=478, scrollbar='yes'"); in the head of the page I'm loading in main. It still doesn't work.