473,323 Members | 1,547 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,323 software developers and data experts.

closing a child window on logout

Let's say a user logs in to the system. He opens pop-up forms and then logs out.

Is there a way to automatically close all child windows(pop-up windows) when a user clicks the logout button?

I need an answer as soon as possible. Thank you.
Sep 26 '07 #1
5 4089
Atli
5,058 Expert 4TB
Hi. Welcome to The Scripts.

I'm pretty sure this is not possible. But if it is, it would be some kind of JavaScript.
So, I'm going to move your question over there, where the JavaScript experts should find it.
Sep 27 '07 #2
acoder
16,027 Expert Mod 8TB
Let's say a user logs in to the system. He opens pop-up forms and then logs out.

Is there a way to automatically close all child windows(pop-up windows) when a user clicks the logout button?

I need an answer as soon as possible. Thank you.
Post your code.

If you kept a reference to the windows created, you can close them using the close() method.
Sep 28 '07 #3
How do I make a reference to other windows?
Oct 3 '07 #4
dmjpro
2,476 2GB
How do I make a reference to other windows?
Expand|Select|Wrap|Line Numbers
  1. function open_children()
  2. {
  3.  var win1 = window.open(....);
  4.  var win2 = window.opne(....);
  5.  .
  6.  .
  7. }
  8. function log_out()
  9. {
  10.  win1.close();
  11.  win2.close();
  12.  .
  13.  .
  14. }
  15.  
Remember one thing the second parameter in window.open must be different for different windows.

Kind regards,
Dmjpro.
Oct 3 '07 #5
you just use the onclick event, and the names of the windows:
[HTML]<input type="button" value="Log Out" onclick="win1.close();win2.close();etc" />[/HTML]
Oct 3 '07 #6

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

Similar topics

5
by: Ron L | last post by:
I have an MDI application with a number of child windows. In each child window I am catching the Closing event and having the child window decide if it should set cancel to true. The intent here...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
5
by: Ron L | last post by:
I have an MDI application with a number of child windows. In each child window I am catching the Closing event and having the child window decide if it should set cancel to true. The intent here...
4
by: reemamg | last post by:
From a parent window a new child window is open with window.open <script type="text/javascript" language="JavaScript" > function abc() { if(window.event.clientY <0 &&...
5
by: Nithu25 | last post by:
Hi All, I have a parent window where i have three links. On clicking those links, new window will be opened as a pop up. When i logout from the parent window, the child windows should be closed....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.