[prog] JavaScript question: submitting a form to a new Window in IE 5.5

Mary mary-linuxchix at puzzling.org
Thu Oct 6 16:02:35 EST 2005


Problem: I have an HTML form I want to submit to a new window. ie, I
want a user to click on the button and the result pops up in a new
window. I also want to be able to specify the size of the new window, so
I can't just use <form target="_top"> or anything like that.

Judging from Google, this is pretty much what everyone does:

<html>

<body>

<form action="" target="foo" onsubmit="window.open('', 'foo',
'width=450,height=300,status=yes')"> 
<input name="q">
<input type="submit"/>
</form>

</body>

</html>

However, on IE 5.5 for Windows NT 4, which the site needs to support,
this pops up *two* new windows: an empty one which is sized 450x300 and
one with the result of the form, which is sized much larger. Is there a
way to do this that works on IE 5.5?

-Mary


More information about the Programming mailing list