Connecting Tech Pros Worldwide Forums | Help | Site Map

Accessing grand parent function when parent window is closed.

Newbie
 
Join Date: May 2009
Posts: 5
#1: Jul 8 '09
Is this possible?

I am trying to access function from grand parent window (the main window) in my child popup window but the parent window is closed in this case.

a.jsp --> grand parent window (main browser window)
b.jsp--> parent window (pop up window)
c.jsp--> child window (pop up window)

I need to call a function from a.jsp in c.jsp when b.jsp is closed.

Thanks

Newbie
 
Join Date: May 2009
Posts: 5
#2: Jul 8 '09

re: Accessing grand parent function when parent window is closed.


This is a javascript question. I have javascript functions defined in all jsps.

Thanks.
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#3: Jul 8 '09

re: Accessing grand parent function when parent window is closed.


When c.jsp is created, pass the reference of a.jsp via b.jsp, e.g.
Expand|Select|Wrap|Line Numbers
  1. var grandParent = parent.parent;
Reply

Tags
child, function, parent, popup, window