RE: Accessing A Function from a child window

by "Charlton, Mark" <Mark.Charlton(at)sgcna.com>

 Date:  Wed, 24 Jan 2001 19:51:12 -0500
 To:  "'Steve Segarra'" <ssegarra(at)mitre.org>,
"'hwg-techniques(at)hwg.org'" <hwg-techniques(at)hwg.org>
  todo: View Thread, Original
Hi

Try 'opener' instead of 'parent'

e.g.   window.opener.setValue(x)

MC

-----Original Message-----
From: Steve Segarra [mailto:ssegarra(at)mitre.org]
Sent: Wednesday, January 24, 2001 5:17 PM
To: hwg-techniques(at)hwg.org
Subject: Accessing A Function from a child window


Hi all,
	After opening a mini window, how do you refer to its parent?  IE, I
opened a window that shows the layout of a building, the user clicks a
location inside the building and then the window calls a function in the
main window telling it what was clicked.  How do I refer to the main
window?  I tried parent and top but to no avail.  The code I was using
was this:

-- mini window --
function setValue(x){
	parent.setValue(x);
}


-- main window --
function setValue(x){
	// do something with x
}

thanks,
steve

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.