[thelist] Form which submits to a blank sized window

Chris Heilmann lists at onlinetools.org
Tue Mar 22 06:51:26 CST 2005


> I want to create a form which will submit data to a new blank window.
> The new blank window must open to a specific size with no navigation
> bar.
<form action="foo.php" target="_blank" onsubmit="return submit2win(this);">
<input type="submit" />
</form>

and the JS:
	function submit2win(o)
		{
			foowin=window.open('','foowin','width=200,height=200,toolbars=no');
			o.target='foowin';
			o.submit();
			return false;
		}
In action:
http://www.onlinetools.org/tests/submit2win.html

Would be a quick and dirty solution. However, that might fail when the
window wasn't opened for some reason.

HTH
Chris
-- 
Chris Heilmann
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
Binaries: http://www.onlinetools.org/



More information about the thelist mailing list