By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,109 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

How to close the window after submitting the form

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.