Many people have asked how they can submit a form to a new window. This is fairly trivial to accomplish; you can just set up your form tag like this:
<form target=_blank action=whatever.asp> |
However, some would like to submit their forms to a new window that they have a little more control over.
This is not really an ASP issue, as the solution could be used in any web-based technology (including plain HTML). However, here is a way to submit a form to a new window, and have control over parameters like width, height, toolbar, etc.:
<form name=form1 method=post action=whatever.asp target=myNewWin> <input type=hidden name=foo value='bar'> <input type=button value=' Submit ' onClick='sendme();'> </form> <script> function sendme() { window.open("","myNewWin","width=500,height=300,toolbar=0"); var a = window.setTimeout("document.form1.submit();",500); } </script> |