Form target new page in same window

S

Simon Wigzell

I just want my form target to be another page but open it in the same
window. Here is my code for the 2 pages :

-------------------------------form1.htm------------------------------------
<html>
<body>
This is form 1
<form ACTION="form2.htm" METHOD="POST" target="self">
<input type="submit" value="Submit">
</form>
</body>
</html>
-------------------------------form2.htm------------------------------------
<html>
<body>
This is form 2
<form ACTION="form1.htm" METHOD="POST" target="self">
<input type="submit" value="Submit">
</form>
</body>
</html>
----------------------------------------------------------------------------
--

You'd think the same window would just switch pages back and forth as you
clicked the submit buttons but it doesn't work. Not only does the new form
open in a seperate window but it then claims that it is an invalid address
and won't display the page.

http://www.mississippiprinting.com/MPCNew/form1.htm

http://www.mississippiprinting.com/MPCNew/form2.htm

What simple thing have I missed here? Thanks!
 
G

Guest

Hi Simon,

What exactly are you trying to accomplish with this.

If you want a form in a new window, the link to the form page should be set to open in a new window. After submitting, the submit button will normally take the user to a default confirmation, custom confirmation or another page in your site.
This would generally be in the same window as the form.

If you are building a FrontPage form and are attempting to send to file or email, the Method would be post and the Action is to webbot.

This is the normal FP form tag ...

<form method="POST" action="--WEBBOT-SELF--">

By eliminating the webbot and post, you are rendering the form useless.

In addition, by setting target self, you are in effect trying to send the form to itself. The FrontPage form handler doesn't bode well with this.

If you need general info about FP forms, stop by my site.

Mike Smith,
http://FrontPageForms.com
Form Tutorials & Form Script Examples
 
B

Bob Lehmann

First of all, it's "_self" not "self". Second of all, if you don't want a
new window, remove the target attribute.

Bob Lehmann
 
S

Simon Wigzell

This is just a stripped down example. I have a whole series of forms. Which
form comes up subsequenty depends on the responses in the current form. I
have it so it is working by opening a new window for the next form on submit
of the current form but I would like it to just always be in the same window
e.g. send the results of the current form to the next form but reuse the
current window. Is that not possible?



FrontPageForms said:
Hi Simon,

What exactly are you trying to accomplish with this.

If you want a form in a new window, the link to the form page should be
set to open in a new window. After submitting, the submit button will
normally take the user to a default confirmation, custom confirmation or
another page in your site.
This would generally be in the same window as the form.

If you are building a FrontPage form and are attempting to send to file or
email, the Method would be post and the Action is to webbot.
This is the normal FP form tag ...

<form method="POST" action="--WEBBOT-SELF--">

By eliminating the webbot and post, you are rendering the form useless.

In addition, by setting target self, you are in effect trying to send the
form to itself. The FrontPage form handler doesn't bode well with this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top