Connecting Tech Pros Worldwide Forums | Help | Site Map

How to close the window after submitting the form

varun
Guest
 
Posts: n/a
#1: Jul 12 '06
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


Adrienne Boswell
Guest
 
Posts: n/a
#2: Jul 12 '06

re: How to close the window after submitting the form


Gazing into my crystal ball I observed "varun" <iamrupa@gmail.com>
writing in news:1152687012.754509.65900@b28g2000cwb.googlegro ups.com:
Quote:
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

Harlan Messinger
Guest
 
Posts: n/a
#3: Jul 12 '06

re: How to close the window after submitting the form


varun wrote:
Quote:
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?
Quote:
>
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.
Quote:
its not wrking in netscape and mozilla but working fine in IE and opera
Closed Thread