473,395 Members | 1,462 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Target for form to open in same window

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

This is a stripped down example. I actually have a series of forms, the
acatual forms that come up are determined by the choices the user makes
within the previous forms. It is all working fine if I open separate windows
for each form/page but I'd prefer if they just opened in the same window.

What simple thing have I missed here? Thanks!


Jul 23 '05 #1
3 21015
On Mon, 14 Jun 2004 15:11:01 GMT, Simon Wigzell wrote:
<form ACTION="form2.htm" METHOD="POST" target="self">


You did not validate this as HTML, did you?
<http://www.w3.org/TR/1999/REC-html401-19991224/types.html#idx-target_frame>

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #2
Andrew Thompson wrote:
On Mon, 14 Jun 2004 15:11:01 GMT, Simon Wigzell wrote:
<form ACTION="form2.htm" METHOD="POST" target="self">


You did not validate this as HTML, did you?

<http://www.w3.org/TR/1999/REC-html401-19991224/types.html#idx-target_frame>

Validating would not help in this case.

(a) The DTD does not express the rules for frame target names
(b) "self" is a valid frame target name (it has a different meaning to
"_self", but is still acceptable)

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #3
On Mon, 14 Jun 2004 22:06:19 +0100, David Dorward wrote:
(b) "self" is a valid frame target name (it has a different meaning to
"_self", but is still acceptable)


...uggh! (slaps forehead) Good point.

(grumbles) Knew I shoulda' just called for
a link and been done with it, but no, I had
to be 'clever' as well..

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Rui Pestana | last post by:
Hello all, I want to use the POST method to submit the form and then grab the parameters in the asp file with request.form("parm"). The problem is that I am using the _search target to open...
12
by: Romain | last post by:
Hi, I've used an excellent way to make target="_blank" links that still validate while using HTML 4.01 Transitional doctypes in the past. I learned the trick from :...
16
by: St. Rechsteiner | last post by:
Hi How i made the same effect in xHTML like the - target="_blank" - Tag in HTML 4.01? I will use it with xHTML and CSS ... but the validator say's to me, that this tag wasn't valid for xHTML!...
2
by: Matt | last post by:
In the following code, page1.asp is inside the frame of main.html. When the user click submit button in page1.asp, it will submit the form and open a new window called page2.asp. When the user...
3
by: Robert Atkinson | last post by:
Does anyone know how to replace <a href="url" target="_blank"> with window.open, keeping the window settings the same, i.e. same size, same toolbars, etc. I've tried document.open, and...
4
by: DaveO | last post by:
Hi all I have done lots of VB programming, but am not familiar with JavaScript. Can anyone tell me how to do this ....? I have a JS file for a menu system called menu.js It contains the...
36
by: randau | last post by:
I would like to use the Link Target attribute, but am inhibited by the likelihood of a newly opened browser window completely hiding the Parent browser window. Thus offering the illusion that...
8
by: msnews.microsoft.com | last post by:
I want to redirect the user to a url outside of our website but I want it to preserve our application's window by opening a new window. We have a datagrid that has five hyperlink columns containing...
92
by: Erwin Moller | last post by:
Hi group, I encoutered page validation error, but I don't know a way around. The page has the following doctype: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.