[Javascript] running function in parent window

Rodney Myers rodney at aflyingstart.net
Thu Jul 4 06:02:34 CDT 2002


I use this to set a var for the top window object of the opening window
frameset

if(self.opener){myVar=self.opener.top;}

If the window were not a frameset then it would be OK to have

if(self.opener){myVar=self.opener;}

self.opener should be false if the file is NOT opened as a popup.


Then to run a function from the main window

myVar.functionName();


I had some problems in the running of a popup control panel with
operation under XP - or was it the change from IE5.5 to IE6.0
Actually I think it was XP (bizarrely) because the code was not reported
with problems from IE6.0 users, including close colleagues.

I cannot really say what the problem was, just that things that had
worked and should still work did not and gave very unhelpful error
messages.

So please test what you write in XP.

hth

Rodney

Alan Easton wrote:
> 
> Hi All,
> 
> Quick question, I have a window that opens a smaller window to do some
> calculations, when that window is finished, it closes. What I would like is
> for that smaller window to run a function on the parent window before it
> closes. I just don't know how to reference a function call in the smaller
> window, to run a function that resides on the parent window.
> 
> Any ideas would be appreciated,
> 
> Many thanks,
> 
> Alan Easton...




More information about the Javascript mailing list