473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to detect the window close event.

I have an parent-child window. I need to refresh the parent window when the child window is closed. I had tried
Expand|Select|Wrap|Line Numbers
  1. <body onunload="window.opener.location.reload();">
When i navigate to different page in the child window , each and every time the parent window is refreshed. I want to refresh it only when the child window is closed. How can i do that?
May 31 '10 #1
3 3339
Dormilich
8,658 Expert Mod 8TB
but when i navigate to different page in the child window , each and every time the parent window is refreshed........
the unload event just means "if you leave this page", this can be either closing the window or loading a new page, so the behaviour you see is correct (in terms of code).
May 31 '10 #2
Thanks for your reply.......

what your saying is true........
but i need to refresh the parent page only when the child page is closed........!!!

How do i do that.......?
Jun 1 '10 #3
acoder
16,027 Expert Mod 8TB
Check from the parent window that the child is closed using the 'closed' property.
Jun 2 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: abhay | last post by:
Hello all, I want to trap the window.close() event when the user clicks on the close button of the browser using javascript. Can anyone shed light on this problem ? Thanks in advance. ...
2
by: Tony Clarke | last post by:
This is brobably a newbie question but is there anyway to actually stop a windows close event and stop a user from exiting a page the wrong way. I know you can use the onbeforeUnload to display a...
4
by: sm mehta | last post by:
Hi, I have a web Application that must be licensed. When Customer buys 2 licensees for my application they can only have 2 copies open at a time. What I am doing right now is, I am storing No....
12
by: Patrick Dugan | last post by:
I have an vb.net application that is a module that uses a "application.run" in the sub main to start. There is no form involved (just a system tray icon) How can you detect when the application...
1
by: bloodandrose | last post by:
Can you help me How to detect browser close event? Thanks
2
by: sowmyap | last post by:
Hi, My requirement is I have an asp page in which there is a textbox. If the user clicks on close(X) button in IE without entering a value in the textbox I want a pop up to appear like "Please...
5
by: jimmy | last post by:
Hi all, I want to capture the event when the browser's close button is clicked in an html page. I tried using the event.ClientX and event.ClientY property in the body unload event, and this...
4
by: Mike Scirocco | last post by:
I have an iframe that includes a button: <input type="button" value="close this window" onclick="window.close();" > I would like to detect the iframe close event from the parent window, I was...
4
by: nrocha | last post by:
Hello, I've been trying to detect when a user closes a page or navigates away from it. This is part of a solution for locking pages (that is, if a user enters a page, no one else can enter it...
5
by: agarwalsunitadhn | last post by:
hi.... Currently i am working in a project where i have to maintain the time in between the user logged in. but i got a problem when the user close the application through browser window's close...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.