Close and submit on a web form

Hi,

I have a web form which I have added a submit button to. What I would like to achive is that this button both submits and closes the form.

I am able to do both separately with the form.submit() and window.close() commands but when I combine these the end user is asked wether to close the window or not but the form is submitted regardless of the user selecting Yes or No to this…

Any solution to this issue would be appreciated, even a script that forces a submit and close without prompting the user.

thanks,

Subject: Close and submit on a web form

You could have the $$return value be something that closes the window (meaning that it contains window.close), or to use an XMLHttp request to submit the form, wait for a response, and then do window.close.