Forum Moderators: phranque

Message Too Old, No Replies

On form submit, open results in new window?

         

travelbuff

1:42 pm on Sep 21, 2002 (gmt 0)

10+ Year Member



I hope this is the right forum for this question....

Does anyone know how to have form results open in a new window? What I am trying to do is set up so that when someone enters their email address to subscribe to my newsletter, the confirmation page opens up in a new window when they hit "submit".

Thanks

Mark

NameNick

2:44 pm on Sep 21, 2002 (gmt 0)

10+ Year Member



You can use the target parameter in form tag:

<form action="file.html" method="post" target="_blank">

This will open a new window on submit.

Greetings NN

jatar_k

5:56 pm on Sep 21, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld [webmasterworld.com] travelbuff

The target attribute in the form tag should do it.

travelbuff

10:33 pm on Sep 21, 2002 (gmt 0)

10+ Year Member



Thanks guys, that does work. Can I use a javascript in the target variable manner to define the size of the results window?

Mark

NameNick

11:51 pm on Sep 21, 2002 (gmt 0)

10+ Year Member



Yes. I use this in my projects:

<form action="file.php" method="post" target="foo" onSubmit="window.open('', 'foo', 'width=450,height=300,status=yes,resizable=yes,scrollbars=yes')">

Hope that helps.

NN

travelbuff

1:16 am on Sep 22, 2002 (gmt 0)

10+ Year Member



NN, that did the trick, thanks much for the help!

Mark