JavaScript Mini-FAQ Sooner, or later, as we start learning and using JavaScript, we will all have questions we want answered. One author, Danny Goodman, has compiled a list of typical questions people ask when starting out with JavaScript.
Name:
Jim Lum
Subject:
Re: closewin + form submit
Date:
10-26-1999 03:30PM
Hummm...onSubmit="self.window.close()" closes the pop-up window, but the form was not submitted...:(
Being a java novice I cobbled together some java code and found out that sequence is
important. If window.close is first, that
is done but the form is NOT submitted.
If form.submit() is first, the form is
submitted, but the pop-up is NOT closed.
I would like to think that java functions
always return to their caller and thus
executes to the end of the java code but it
does not look that way. :(
I read some of the java documentation and
could not find any reference to java functions that implicitly terminate a java
routine....but it seems that there are some.
Am I missing something or am I wandering
down some weird path? ...because I'd
really like to close the pop-up window when
the form is submitted.
My form statement (without onSubmit) looks like: