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

how to close the parent window

i am developing window application,i have to forms namely form1,form2.
if i click the button in form1,the frm1 have to close and form2 to display
i used form1.close(),and parent.close nothing is happen please reply soon
Nov 28 '07 #1
8 1108
mzmishra
390 Expert 256MB
try using
window.opener.close();
in the child form
Nov 28 '07 #2
try using
window.opener.close();
in the child form
i had tried but that is its not working
Nov 29 '07 #3
Shashi Sadasivan
1,435 Expert 1GB
following code is within Form1
Expand|Select|Wrap|Line Numbers
  1. Form2 frm2 = new Form2();
  2. frm2.Owner = this;
  3. frm2.Show();
following code goes into Form2 (Form_Load event)
Expand|Select|Wrap|Line Numbers
  1. this.Owner.Close();
  2. //this.Owner.Hide();
you will realise why i have commented the Line which Hides the owner form
Nov 29 '07 #4
following code is within Form1
Expand|Select|Wrap|Line Numbers
  1. Form2 frm2 = new Form2();
  2. frm2.Owner = this;
  3. frm2.Show();
following code goes into Form2 (Form_Load event)
Expand|Select|Wrap|Line Numbers
  1. this.Owner.Close();
  2. //this.Owner.Hide();
you will realise why i have commented the Line which Hides the owner form
please explain me full please please
Nov 30 '07 #5
Shashi Sadasivan
1,435 Expert 1GB
What do you not understand in what i sent?

the code has to be put in 2 different forms
the firt sniippet is where you call form2

and the second snippet is inside form2 when you want to close the parent form
Nov 30 '07 #6
What do you not understand in what i sent?

the code has to be put in 2 different forms
the firt sniippet is where you call form2

and the second snippet is inside form2 when you want to close the parent form
sry sir i cant able to view the code because of the font color thank u
Nov 30 '07 #7
Shashi Sadasivan
1,435 Expert 1GB
Well, how about copying the text , pasting it in a notepad and then trying?

i will remove the cpp tag in it so that it appears in better contrast for you
Nov 30 '07 #8
thank u for ur valuable suggestion
Dec 1 '07 #9

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

Similar topics

3
by: J P Singh | last post by:
Hi Guys Wonder if someone can help me with this. I have a form where a user clicks a button which gives them a pop up windows to allow them to add the data. The user adds the data and click...
1
by: Joe D | last post by:
I think this is a simple question. But I am new to JS. Here is what I want to do: From a parent window, open a popup window (child) to get data from user, then user submit the request, close the...
28
by: PerryC | last post by:
Anyone know how to auto close the parent / opener window without confirmation? I have tried: <script> opener.window.close() </script> ----I put it in the child html page, and nothing...
2
by: Jacques Koorts | last post by:
Hi, I've managed to get the parent window close the child window (popup). I do this by the child calling the parent to close it. How can the child close itself without help from parent? So...
1
by: Marshall Dudley | last post by:
I have an application where in a shopping cart checkout a popup appears which suggests other items that may go with what was ordered with a button to add these items to the cart. When the button...
1
by: gopal srinivasan | last post by:
I need to know how to close a parent modal window when child modal window opens, also i need to know the syntax for writing document on the modal window on the fly, like what we do in case of...
4
by: Colin Graham | last post by:
Hi guys, Just a quickie here that i hope someone can help me with. Basically i want stop the user from closing the popup window using the small x button in the top right hand corner. Im aware...
1
by: mike | last post by:
I have a parent page with a number of child rows on it. When I press an onclick event on the parent page a child window opens and deletes the child data from the db table, then the child window...
3
by: Isabel | last post by:
How can you close all child browser windows that where open by a parent browser window? I have links on a parent (main) page that opens the child page as a separate browser. However, I need to be...
1
by: michal.podlewski | last post by:
Hi All, I have a problem with a simple (as I thought till now) thing: I want to make a link in a child-window which would change site in the parent-window and along with closing child window. The...
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...
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...
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...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.