I'm trying to make a form submit to a new popup window opened with javascript, close after loading, and have the form page simply refresh.
Here's what I have so far:
code:
<form action='script.php' method='post' target='WindowName'
onSubmit="func=window.open('', 'WindowName', 'height=100,width=100');
setTimeout(window.location.reload(true), 2000)">
<!-- Form elements -->
<input type='submit' value='Submit'>
</form>
The window will open and the script will open there. But, the form will not refresh and I don't know how to close the new window after it loads. I need all of the JS to be inline, not have an external script.
can anyone help?