473,626 Members | 3,325 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.opene r)
window.opener.l ocation.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 3825
Gazing into my crystal ball I observed "varun" <ia*****@gmail. com>
writing in news:11******** *************@b 28g2000cwb.goog legroups.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.opene r)
window.opener.l ocation.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.opene r)
window.opener.l ocation.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
33791
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 a valid file name (no "/" or "\" characters) was entered. If the validation functions returns true, the form should be submitted and the window closed. If the function returns false the form window should stay open so the use can enter a new file...
1
4528
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 child window, an ASP page is generated from server and displayed with data in parent window, rather than child window. Right now, I can display in child window. But do not know how to display in parent. TIA
2
18698
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 containing some text and an animated GIF. The javascript returns 'True' and the file is uploaded. All of that works great. Problem: Now I am trying to close the child window after the file has been uploaded. Below is the JavaScript I'm using:
11
2943
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 window finishes loading? i've been racking my brain on this for the last two days. here is the code for the parent window that i have been testing with. testfoo.htm is just a blank html page used for testing. <head>
8
6288
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! Rob // submits info like this: http://www.google.com/?select= <script type="text/javascript"> function launchIt() {
3
1701
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 hyperlink which closes the window. However with pages which display data retrieved from a database using PHP i use a form to submit a search on the page which displays results. At the bottom of the page
9
2335
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 : a) Form data on the Parent (opener) page to be submitted. b) Some (asp.net) code behind executed for the Parent page. c) Pop-Up window to close.
4
21275
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 DB. I would like the popup to close immediately after the submit button is clicked, and data is saved, (or cancel button) - but this does not happen.
1
3215
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 button". when "submit" button pressed, call the "servlet" in this popup window and then close the "popup" window. <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var X = 200; // change the # at the left for a fixed X co-ordinate to accommodate...
0
8199
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8705
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8638
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5574
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4092
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2626
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1511
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.