Avatar of boxsters
boxsters
 asked on

Test if parent window exist

Hi,

I have the following frames

-------------------
|     title       |
-------------------
|    |            |
|menu|  content   |
|    |            |
-------------------

and a popup window

---------
| popup |
|       |
---------

I use a JSP errorpage from content frame and popup window and i need to reload the menu frame in both case.

I try this : parent.menu.location.reload() but this give me an error from the popup window.

Can you help me please ?

JavaScript

Avatar of undefined
Last Comment
boxsters

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
marc-pm

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
boxsters

ASKER
Thanks a lot !

I try this code and it's what i need.

if (window.opener == null) {
     parent.menu.location.reload()
} else {
     window.opener.parent.menu.location.reload()
}
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy