473,323 Members | 1,570 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 4088
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: 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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.