473,322 Members | 1,778 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.

Close window

Hi,

I have a popup (child) window that it is called by a button in my main
(parent) window.
How can I set the child window for not closing before the parent window?
What do I have to do?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca
Nov 20 '05 #1
32 2726
Ruca,

bind the OnClosing event or overwrite OnClosing of the form's base class.
With the EventArgs, use the Cancel property to prevent the form from
closing.

Klaus

"ruca" <ru***@iol.pt> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi,

I have a popup (child) window that it is called by a button in my main
(parent) window.
How can I set the child window for not closing before the parent window?
What do I have to do?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

Nov 20 '05 #2
Ruca,

bind the OnClosing event or overwrite OnClosing of the form's base class.
With the EventArgs, use the Cancel property to prevent the form from
closing.

Klaus

"ruca" <ru***@iol.pt> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi,

I have a popup (child) window that it is called by a button in my main
(parent) window.
How can I set the child window for not closing before the parent window?
What do I have to do?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

Nov 20 '05 #3
Hi

that event don't appear in my list of page events.
What do I have to do?
I have another question. How can I open only one popup at a time, ie, when I
click to open one popup, if another is open this one closes.
I have a funtion but only works if it is called by an link and not a button.

I have this in javascript:
--------------------- begin java code--------------------------
var popup = null;

//destroy popup if aleady opened
function DestroyWnd ()
{
// close the current window
if(popup != null)
{
popup.close();
popup = null;
}
}

function pick(Src)
{
if((popup == null) || popup.closed)
{

var url = "xpto.aspx?srcA=" + Src
popup = window.open(url, "_blank", "height=200, width=200, left=250,
top=200, " +
"location=no, menubar=no, resizable=no, " +
"scrollbars=no, titlebar=no, toolbar=no", true);
}
else
{
DestroyWnd();
pick(Src);
}
}
--------------------- end java code--------------------------
In my page_load i Have this
--------------------- begin vb code--------------------------

Sub Page_Load(...)
...
Button1.Attributes.Add("OnClick","pick('textbox1') ;")
...
End Sub

--------------------- end vb code--------------------------
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca
Nov 20 '05 #4
Hi

that event don't appear in my list of page events.
What do I have to do?
I have another question. How can I open only one popup at a time, ie, when I
click to open one popup, if another is open this one closes.
I have a funtion but only works if it is called by an link and not a button.

I have this in javascript:
--------------------- begin java code--------------------------
var popup = null;

//destroy popup if aleady opened
function DestroyWnd ()
{
// close the current window
if(popup != null)
{
popup.close();
popup = null;
}
}

function pick(Src)
{
if((popup == null) || popup.closed)
{

var url = "xpto.aspx?srcA=" + Src
popup = window.open(url, "_blank", "height=200, width=200, left=250,
top=200, " +
"location=no, menubar=no, resizable=no, " +
"scrollbars=no, titlebar=no, toolbar=no", true);
}
else
{
DestroyWnd();
pick(Src);
}
}
--------------------- end java code--------------------------
In my page_load i Have this
--------------------- begin vb code--------------------------

Sub Page_Load(...)
...
Button1.Attributes.Add("OnClick","pick('textbox1') ;")
...
End Sub

--------------------- end vb code--------------------------
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca
Nov 20 '05 #5
Cor
Hi Ruca,

When you make a webform in his self container, the page is disconnected as
soon as you have showed it.

There are posibilities to prevent that from closing, I hope you are not
making such an terrible webform.

When you want what you ask, why than not just use a large label on your
form in a very different colour, the only problem is that the user cannot
move it. (Although with some Javascript and the style possitition absolute
that should be possible too)

Just my thought,

Cor

Nov 20 '05 #6
Cor
Hi Ruca,

When you make a webform in his self container, the page is disconnected as
soon as you have showed it.

There are posibilities to prevent that from closing, I hope you are not
making such an terrible webform.

When you want what you ask, why than not just use a large label on your
form in a very different colour, the only problem is that the user cannot
move it. (Although with some Javascript and the style possitition absolute
that should be possible too)

Just my thought,

Cor

Nov 20 '05 #7
Are you talking WinForms or ASP.NET - because that's different?
If ASP.NET, you're in the wrong group.
Make sure to not crosspost the next time.

Klaus

"Klaus Löffelmann" <fo***********@loeffelmann.de> schrieb im Newsbeitrag
news:%2***************@TK2MSFTNGP09.phx.gbl...
Ruca,

bind the OnClosing event or overwrite OnClosing of the form's base class.
With the EventArgs, use the Cancel property to prevent the form from
closing.

Klaus

"ruca" <ru***@iol.pt> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi,

I have a popup (child) window that it is called by a button in my main
(parent) window.
How can I set the child window for not closing before the parent window?
What do I have to do?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca


Nov 20 '05 #8
Are you talking WinForms or ASP.NET - because that's different?
If ASP.NET, you're in the wrong group.
Make sure to not crosspost the next time.

Klaus

"Klaus Löffelmann" <fo***********@loeffelmann.de> schrieb im Newsbeitrag
news:%2***************@TK2MSFTNGP09.phx.gbl...
Ruca,

bind the OnClosing event or overwrite OnClosing of the form's base class.
With the EventArgs, use the Cancel property to prevent the form from
closing.

Klaus

"ruca" <ru***@iol.pt> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi,

I have a popup (child) window that it is called by a button in my main
(parent) window.
How can I set the child window for not closing before the parent window?
What do I have to do?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca


Nov 20 '05 #9
Cor
Hi Klaus,

Why is this the wrong group for VB.net development for webapplications, that
is normally done here?

There is no other international newsgroup for that.

I know that this is not as in the German newsgroups, but there is a
newsgroup entwickler.dotnet.asp)

I hope this makes it more clear?

Cor
Nov 20 '05 #10
Cor
Hi Klaus,

Why is this the wrong group for VB.net development for webapplications, that
is normally done here?

There is no other international newsgroup for that.

I know that this is not as in the German newsgroups, but there is a
newsgroup entwickler.dotnet.asp)

I hope this makes it more clear?

Cor
Nov 20 '05 #11
Cor
Hi Klaus,

Rucca does vb.net webforms (I know this) but he has that too in the footer
from his message.

Cor
Nov 20 '05 #12
Cor
Hi Klaus,

Rucca does vb.net webforms (I know this) but he has that too in the footer
from his message.

Cor
Nov 20 '05 #13
Cor
Hi Claus,

I saw I forgot to send this message (pusch the send button) an hour ago.

Sorry

:-)

Cor
Nov 20 '05 #14
Cor
Hi Claus,

I saw I forgot to send this message (pusch the send button) an hour ago.

Sorry

:-)

Cor
Nov 20 '05 #15
Cor,

you're absolutely right. Sorry for that.
I really thought, there was not only
microsoft.public.dotnet.framework.asp.net, but that group also seperated in
VB and C#.
(Why isn't that so, by the way, would make sense, wouldn't it?)

Klaus

"Cor" <no*@non.com> schrieb im Newsbeitrag
news:eF*************@TK2MSFTNGP11.phx.gbl...
Hi Klaus,

Why is this the wrong group for VB.net development for webapplications, that is normally done here?

There is no other international newsgroup for that.

I know that this is not as in the German newsgroups, but there is a
newsgroup entwickler.dotnet.asp)

I hope this makes it more clear?

Cor

Nov 20 '05 #16
Cor,

you're absolutely right. Sorry for that.
I really thought, there was not only
microsoft.public.dotnet.framework.asp.net, but that group also seperated in
VB and C#.
(Why isn't that so, by the way, would make sense, wouldn't it?)

Klaus

"Cor" <no*@non.com> schrieb im Newsbeitrag
news:eF*************@TK2MSFTNGP11.phx.gbl...
Hi Klaus,

Why is this the wrong group for VB.net development for webapplications, that is normally done here?

There is no other international newsgroup for that.

I know that this is not as in the German newsgroups, but there is a
newsgroup entwickler.dotnet.asp)

I hope this makes it more clear?

Cor

Nov 20 '05 #17
Cor,

funny, the whole thread is messed up... :-)
I just noticed, that I actually answered myself in the first branch.
I guess, I'm confused today. Should get more sleep.

Klaus

"Cor" <no*@non.com> schrieb im Newsbeitrag
news:ej**************@TK2MSFTNGP09.phx.gbl...
Hi Claus,

I saw I forgot to send this message (pusch the send button) an hour ago.

Sorry

:-)

Cor

Nov 20 '05 #18
Cor,

funny, the whole thread is messed up... :-)
I just noticed, that I actually answered myself in the first branch.
I guess, I'm confused today. Should get more sleep.

Klaus

"Cor" <no*@non.com> schrieb im Newsbeitrag
news:ej**************@TK2MSFTNGP09.phx.gbl...
Hi Claus,

I saw I forgot to send this message (pusch the send button) an hour ago.

Sorry

:-)

Cor

Nov 20 '05 #19
Thank you guys for your help.
I only was enable to see all your messages now, and I must say that this is
the most funny thread that I ever participate.
Sorry I'm posting this message in a group of work, but I can't resist. :)
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

"ruca" <ru***@iol.pt> escreveu na mensagem
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi,

I have a popup (child) window that it is called by a button in my main
(parent) window.
How can I set the child window for not closing before the parent window?
What do I have to do?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

Nov 20 '05 #20
Thank you guys for your help.
I only was enable to see all your messages now, and I must say that this is
the most funny thread that I ever participate.
Sorry I'm posting this message in a group of work, but I can't resist. :)
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

"ruca" <ru***@iol.pt> escreveu na mensagem
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi,

I have a popup (child) window that it is called by a button in my main
(parent) window.
How can I set the child window for not closing before the parent window?
What do I have to do?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

Nov 20 '05 #21
Sorry Cor, but maybe I don't understand what you trying to say me.

My popup window have some fields (but it is not terrible, heheh) that when
closed return to main window if user change one of them.
I can't understand whne you says:
"...why than not just use a large label on your form in a very different
colour, the only problem is that the user cannot move it."

Sorry not understand the idea, but I'll glad if you explain to me again.

Thank you very much.
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca
"Cor" <no*@non.com> escreveu na mensagem
news:eQ**************@tk2msftngp13.phx.gbl...
Hi Ruca,

When you make a webform in his self container, the page is disconnected as
soon as you have showed it.

There are posibilities to prevent that from closing, I hope you are not
making such an terrible webform.

When you want what you ask, why than not just use a large label on your
form in a very different colour, the only problem is that the user cannot
move it. (Although with some Javascript and the style possitition absolute
that should be possible too)

Just my thought,

Cor

Nov 20 '05 #22
Sorry Cor, but maybe I don't understand what you trying to say me.

My popup window have some fields (but it is not terrible, heheh) that when
closed return to main window if user change one of them.
I can't understand whne you says:
"...why than not just use a large label on your form in a very different
colour, the only problem is that the user cannot move it."

Sorry not understand the idea, but I'll glad if you explain to me again.

Thank you very much.
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca
"Cor" <no*@non.com> escreveu na mensagem
news:eQ**************@tk2msftngp13.phx.gbl...
Hi Ruca,

When you make a webform in his self container, the page is disconnected as
soon as you have showed it.

There are posibilities to prevent that from closing, I hope you are not
making such an terrible webform.

When you want what you ask, why than not just use a large label on your
form in a very different colour, the only problem is that the user cannot
move it. (Although with some Javascript and the style possitition absolute
that should be possible too)

Just my thought,

Cor

Nov 20 '05 #23
Cor
Hi Ruca,

I can be wrong, but when I see that code is what I think happening that you
open an assynchonous window in another window.

You have in my opinion no control anymore over that window.

Therefore I said, can you not better create a label, and now I know there
are fields in it, create a panel in your main form with the information you
want. That is than full controlled from the Server side. That panel can you
show and hide any time you want. The fields on it you can even create
dynamicly.

However just my thought,

Cor
Nov 20 '05 #24
Cor
Hi Ruca,

I can be wrong, but when I see that code is what I think happening that you
open an assynchonous window in another window.

You have in my opinion no control anymore over that window.

Therefore I said, can you not better create a label, and now I know there
are fields in it, create a panel in your main form with the information you
want. That is than full controlled from the Server side. That panel can you
show and hide any time you want. The fields on it you can even create
dynamicly.

However just my thought,

Cor
Nov 20 '05 #25
Ok, I already understand your point.
But one moe questio if you know How to answer:

If I have a link (not link button) calling the popup window, I can have only
and only one popup window at a time.
With the exactly the same code in VB and JavaScript, if I have a button or
linkbutton the same code don't work and opens so many popup's as the clicks
that I do.
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

"Cor" <no*@non.com> escreveu na mensagem
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi Ruca,

I can be wrong, but when I see that code is what I think happening that you open an assynchonous window in another window.

You have in my opinion no control anymore over that window.

Therefore I said, can you not better create a label, and now I know there
are fields in it, create a panel in your main form with the information you want. That is than full controlled from the Server side. That panel can you show and hide any time you want. The fields on it you can even create
dynamicly.

However just my thought,

Cor

Nov 20 '05 #26
Ok, I already understand your point.
But one moe questio if you know How to answer:

If I have a link (not link button) calling the popup window, I can have only
and only one popup window at a time.
With the exactly the same code in VB and JavaScript, if I have a button or
linkbutton the same code don't work and opens so many popup's as the clicks
that I do.
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

"Cor" <no*@non.com> escreveu na mensagem
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi Ruca,

I can be wrong, but when I see that code is what I think happening that you open an assynchonous window in another window.

You have in my opinion no control anymore over that window.

Therefore I said, can you not better create a label, and now I know there
are fields in it, create a panel in your main form with the information you want. That is than full controlled from the Server side. That panel can you show and hide any time you want. The fields on it you can even create
dynamicly.

However just my thought,

Cor

Nov 20 '05 #27
Cor
Hi Ruca,

Can you not disable that A object in its onclick event?

Cor
Nov 20 '05 #28
Cor
Hi Ruca,

Can you not disable that A object in its onclick event?

Cor
Nov 20 '05 #29
How come?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

"Cor" <no*@non.com> escreveu na mensagem
news:uL**************@TK2MSFTNGP12.phx.gbl...
Hi Ruca,

Can you not disable that A object in its onclick event?

Cor

Nov 20 '05 #30
How come?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

"Cor" <no*@non.com> escreveu na mensagem
news:uL**************@TK2MSFTNGP12.phx.gbl...
Hi Ruca,

Can you not disable that A object in its onclick event?

Cor

Nov 20 '05 #31
Maybe to cryptic

A link is normaly an A object if another word for it is an HREF.

I thought you did only want to open your window once.

So when you try to write a piece of java in the onclick of that A object to
disable it, I thought it would not open that window anymore.

Not that I did do it ever in this way, therefore was it more as a question.

:-)

Cor
Nov 20 '05 #32
Maybe to cryptic

A link is normaly an A object if another word for it is an HREF.

I thought you did only want to open your window once.

So when you try to write a piece of java in the onclick of that A object to
disable it, I thought it would not open that window anymore.

Not that I did do it ever in this way, therefore was it more as a question.

:-)

Cor
Nov 20 '05 #33

This thread has been closed and replies have been disabled. Please start a new discussion.

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...
4
by: John H. | last post by:
Hello I have some trouble in closing a window, Here is the problem: I develop a asp.net website use client side valiation <asp:CustomValidator id="CustomValidator1"...
9
by: Graham | last post by:
What I currently have is a page that opens another browser at 800x600, once that is loaded I would like to close the orginal page down while keeping the page that it has just opened open (To make...
6
by: marcelf3 | last post by:
Hello.. This page opens a window with some information, but everytime the user changes a field in the parent window, the child window needs to be closed. These 2 functions were supposed to do the...
4
by: GrantS | last post by:
I am having a problem closing a popup window opened modally. When I try to close the window (when the user hits save button and the data has been processed), the Popup window opens as a full screen...
5
by: lindanr | last post by:
In ASP.NET 2005 I have an onblur="window.close()" javascript event in the <body> tag. When I click on the window's scrollbar, the window closes. The same code works fine in ASP.NET 2003. Any...
9
by: Stan B | last post by:
I create a popup window by calling window.showModalDialog Popup window has Ok button with this code attached: === string Script = "<script language=JavaScript>" + "{" + "window.close();" +...
7
by: Toccoa | last post by:
After considerable googling - I mean searching with Google(r) - I could not find javascript on a button or <a href=... to close a window in the latest versions of IE and FireFox. There seemed...
2
by: kurt sune | last post by:
Hello, I have a weird problem, I hope someone can explain this for me. I have a webpage using masterpage. In it I create a popup window using this code: Dim js As String = "<script...
6
by: =?Utf-8?B?UGF1bA==?= | last post by:
I am looking for a java script to close a web form that I can attatch to a button click event. I am using vs2005, c#. Thanks -- Paul G Software engineer.
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: 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
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...
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.