/    Sign up×
Community /Pin to ProfileBookmark

Refresh parent of parent

[FONT=Times New Roman]Hi…
I have a refreshing issue…
I have a main page (index.jsp) which has two links …first one will open a Contact popup and another will open an Edit pop up.
Also the Contact pop up has an Edit link which will open the same Edit pop up(in index page). when you click on the Edit link on the Contact pop up will close the Contact window.

what I have to perform is to refresh the index page(main page) when you click on Save button/link on the Edit page.
On Edit pop up,
<body onUnload=”window.opener.location.reload(true);window.close();”>
..This will work without any issues when I click on the edit link on the index.jsp.
However, will get error if the edit window is opened from the Contact popup.
This case, the window.opener.location points to the Contact pop up.

Please help me to refresh the main page whether I am trying to open the pop up window from the main window or Contact pop up window.[/FONT]

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisNov 20.2006 — Give the page a name, and create a handle using the name rather than the "opener" stuff.
&lt;body onunload="win=window.open('','theName');win.location.reload(true)"&gt;
Copy linkTweet thisAlerts:
@fins4uauthorNov 20.2006 — Thnx for your reply. I tried that

<body onUnload="win=window.open('','index.jsp');win.location.reload(true);window.close();">

But getting error "invalid arquement". The page I have to refresh is index.jsp(main page). Winodw.open will open a new index.jsp page. I dnt want to open a new window. The index page should be opened when I click on the Save button on edit page and I want to refresh that page only.
Copy linkTweet thisAlerts:
@gil_davisNov 20.2006 — In "index.jsp", you need to execute the following line of script:window.name = "mainPage";
Then you can use this:&lt;body onunload="win=window.open('','mainPage');win.location.reload(true)"&gt;Notice that there is no URL specified, only a NAME.
Copy linkTweet thisAlerts:
@fins4uauthorNov 21.2006 — Thnx for your help. I hope it should work.
×

Success!

Help @fins4u spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...