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

Closing Child Window before Submitting Form

I have a form that has a button on it that can open a child form with the
window.open(...) Javascript call. When the form is submitted, I'd like to
close the child form, if it's opened. I have the code to close the form ok,
but what I can't seem to do is get the form to call my closeChildForm()
function before actually going back to the server.

I've tried all sorts of things from using RegisterOnSubmitStatement in the
page_load event to using a piece of code I found here involving swapping
__doPostBack with my own function.

Neither worked. If anyone has any ideas, I've appreciate being pointed in
the right direction.

Thanks,

Jeff

Nov 17 '05 #1
2 1148
Could you use reponse .redirectt to open another page in your child window
that uses a javascript fuction in the <body> tag like
onLoad="javascript:window.close()" to close this window? I was just playing
around with exactly the xsame thing and I think that's how I did it.. I
can't find the code at the moment........
"Jeff Cooper" <js******@compudude.com> wrote in message
news:sv*******************@newsread1.news.atl.eart hlink.net...
I have a form that has a button on it that can open a child form with the
window.open(...) Javascript call. When the form is submitted, I'd like to
close the child form, if it's opened. I have the code to close the form ok, but what I can't seem to do is get the form to call my closeChildForm()
function before actually going back to the server.

I've tried all sorts of things from using RegisterOnSubmitStatement in the
page_load event to using a piece of code I found here involving swapping
__doPostBack with my own function.

Neither worked. If anyone has any ideas, I've appreciate being pointed in
the right direction.

Thanks,

Jeff

Nov 17 '05 #2
Thanks. I'll give it a try...

"Mark" <py*******@hotmail.com> wrote in message
news:vo************@corp.supernews.com...
Could you use reponse .redirectt to open another page in your child window
that uses a javascript fuction in the <body> tag like
onLoad="javascript:window.close()" to close this window? I was just playing around with exactly the xsame thing and I think that's how I did it.. I
can't find the code at the moment........
"Jeff Cooper" <js******@compudude.com> wrote in message
news:sv*******************@newsread1.news.atl.eart hlink.net...
I have a form that has a button on it that can open a child form with the window.open(...) Javascript call. When the form is submitted, I'd like to close the child form, if it's opened. I have the code to close the form

ok,
but what I can't seem to do is get the form to call my closeChildForm()
function before actually going back to the server.

I've tried all sorts of things from using RegisterOnSubmitStatement in the page_load event to using a piece of code I found here involving swapping
__doPostBack with my own function.

Neither worked. If anyone has any ideas, I've appreciate being pointed in the right direction.

Thanks,

Jeff


Nov 17 '05 #3

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

Similar topics

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...
2
by: Irvin Amoraal | last post by:
Process: I have a form which uploads a file from client to server written in PHP. When the user presses the submit button, I use the "onSubmit" event to execute javascript to open a child window...
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...
2
by: Ron L | last post by:
I have an MDI application which opens a number of child windows, each of which could have data in a state that needs to be saved. Each child window catches its Closing event and cancels it if the...
1
by: Chris Bruce | last post by:
In my application I need a way to distiguish between the following events: 1. When a user closes an MDI child window. 2. When the user closes the MDI parent window which subsequently closes the...
9
by: SJ | last post by:
Here's the scenario Website has a button that pops up a confirmation window when clicked. When the user clicks the "confirm" button in this popup window, I want all the following to happen :...
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...
6
by: **Developer** | last post by:
I've been looking but can't find out how in a form Closing event to know if the closing is because the form's "X" had been clicked or the main form's "X" was clicked. That is, I need to know if...
4
by: hashya | last post by:
Hi, I am trying to submit form in child window from parent window itself. However, not getting through it. e.g. Parent Window: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">...
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...
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: 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
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
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.