[thelist] Submit a form and shut the window
Christian Heilmann
lists at onlinetools.org
Tue Feb 1 17:22:06 CST 2005
>
>
>
>
>
>>>
>>>
>><form action="bla" target="parentwin" onsubmit="window.close()"> should
>>do the trick, shouldn't it?
>>
>>
>>
>Not 100% sure, but I think that would close the window before the form
>submitted as you typically use onsubmit with a return:
>onsubmit="return somefunction();"
>
>
The parent window should have a name for starters, which is set as the
target of the form.
The return is only needed when you have an own function, not a native
one like window. close
You can roll an own function, and submit the form via javascript, and
then close the window, that might be safer.
More information about the thelist
mailing list