473,323 Members | 1,537 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.

How to close the window after submitting the form

Hi,
I am using goahead webserver...i have a form, in acction attribute i am
calling a c function..
after submitting the form i need to close the window and i need to
reload the window which navigated to this window.....

i used this javasript .......
function doUnLoad()

{
window.close();
if(window.opener)
window.opener.location.reload();
}

Once I've submitted the form, I've navigated away from the page.
JavaScript will stop executing and the browser will load the
page specified by the ACTION attribute of the <formelement.

so i am not getting where i need to call this function...i called on
unload event is it correct...
its not wrking in netscape and mozilla but working fine in IE and opera

Jul 12 '06 #1
2 3804
Gazing into my crystal ball I observed "varun" <ia*****@gmail.com>
writing in news:11*********************@b28g2000cwb.googlegro ups.com:
Hi,
I am using goahead webserver...i have a form, in acction attribute i am
calling a c function..
after submitting the form i need to close the window and i need to
reload the window which navigated to this window.....

i used this javasript .......
function doUnLoad()

{
window.close();
if(window.opener)
window.opener.location.reload();
}

Once I've submitted the form, I've navigated away from the page.
JavaScript will stop executing and the browser will load the
page specified by the ACTION attribute of the <formelement.

so i am not getting where i need to call this function...i called on
unload event is it correct...
its not wrking in netscape and mozilla but working fine in IE and opera

What do you do for visitors with javascript diabled or unavailable?
--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Jul 12 '06 #2
varun wrote:
Hi,
I am using goahead webserver...i have a form, in acction attribute i am
calling a c function..
after submitting the form i need to close the window and i need to
reload the window which navigated to this window.....

i used this javasript .......
function doUnLoad()

{
window.close();
if(window.opener)
window.opener.location.reload();
}
Isn't that like the myth that if you dream about your own death, you'll
die in your sleep? Even if that were true, how would the deceased have
told anyone about the dream?

In other words, how is the code supposed to continue executing in the
window after you've closed the window?
>
Once I've submitted the form, I've navigated away from the page.
JavaScript will stop executing and the browser will load the
page specified by the ACTION attribute of the <formelement.

so i am not getting where i need to call this function...i called on
unload event is it correct...
Show your code, otherwise all is guesswork.
its not wrking in netscape and mozilla but working fine in IE and opera
Jul 12 '06 #3

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

Similar topics

2
by: Seth E Seligman | last post by:
I'm working on a web based file manager. The rename file function creates a new window with a form allowing the user to enter a new file name. Before the form gets submitted, I want to make sure that...
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...
11
by: JSjones | last post by:
when a form is submitted from the main window i want a pop up window to open from the onclick event. i have that working, now how can i close the pop up window from the main window after the main...
8
by: Rob Wahmann | last post by:
I'm having trouble with the following code appending the form name and an empty value to the end of the url. Can anyone tell me what's wrong? I appreciate any tips or advice you can pass along! ...
3
by: mcyi2mr3 | last post by:
Hi all I'm new to javascript and im trying to add a close button function to my certain pages of my site. I use this code: <a href='javascript:window.close();'>Close Window</a> to create a...
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 :...
4
by: Gabriella | last post by:
Hi, I have a popup window that opens from a page on my website. This popup is a form with several fields. Upon submit button it redirects to a server side ASP page which writes all data to the...
1
by: dittu | last post by:
How to close the popup window when submitting the form? I have a sample.jsp. In that page one button is there. when button pressed, open popup window contains one "text box" and one " submit...
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
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: 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: 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...

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.