[prog] JavaScript question: submitting a form to a new Window in
IE 5.5
Mary
mary-linuxchix at puzzling.org
Fri Oct 7 10:39:48 EST 2005
On Thu, Oct 06, 2005, Rachel McConnell wrote:
> As something to try if Almut's suggestion doesn't work: play around with
> a return value after the onsubmit="" javascript:
>
> <form action="" target="foo" onsubmit="window.open('', 'foo',
> 'width=450,height=300,status=yes'); return false;">
Tried this, it causes *nothing at all* to happen when the button is
pressed:
<html>
<body>
<form name="myform" action="" target="foo" onsubmit="window.open('',
'foo', 'width=450,height=300,status=yes'); return false;">
<input name="q">
<button type="button">Submit</button>
</form>
</body>
</html>
Tried this:
<html>
<body>
<form name="myform" action="" target="foo" onsubmit="window.open('',
'foo', 'width=450,height=300,status=yes'); return false;">
<input name="q">
<input type="submit"/>
</form>
</body>
</html>
This causes the smaller window to open alone *but* nothing is submitted
into it. ("return false" is saying "don't do what you'd normally do
there, ie, don't submit the form").
As in my last response to Almut, I tried return false in some other
places too, and manually calling document.formName.submit() followed by
return false. No combination so far causes it to submit into the newly
opened window.
-Mary
More information about the Programming
mailing list