Matt wrote:
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 clicks submit
button on page2.asp, I expected to open a new window called page3.asp.
Unfortunately, it just open page3.asp in the same window as page2.asp, and
now page2.asp is gone.
However, if I just open page1.asp, and begins from there, it is fine.
I think this is because page1.asp is put inside the frame.
No, this has nothing to do with frames nor has it anything to do
with J(ava)Script -- you are completely off topic here. However,
========= main.html ======================
<frameset>
<frame src="page1.asp">
(hopefully this is not your only frame)
</frameset>
================== page1.asp ==============
<form action="page2.asp" target="_blank">
================== page2.asp ==============
<form action="page3.asp" target="_blank">
Any workarounds?? Thanks!!
"_blank" is a reserved target frame name defined in HTML 4.01 Transitional
and XHTML 1.0 Transitional to open a new "window" always.[1] In HTML 3.2,
HTML 4.01 Strict, XHTML 1.0 Strict or XHTML 1.1 there is no "target"
attribute, so if you use that attribute there (and thus create invalid
markup), your user agent should either ignore it (in HTML)[2] or should
either display an error message or should display an error message and
should not render the markup at all (in XHTML served as
application/xhtml+xml, thus using an XML parser)[3].
So the conclusion is that your user agent is malfunctioning, and you can
do nothing about it but to upgrade the UA or change to a working one.
Please ask HTML questions in comp.infosystems.
www.authoring.misc next time.
X-Post F'up2 there.
PointedEars
___________
[1] <http://www.w3.org/TR/html4/types.html#idx-target_frame>
[2] <http://www.w3.org/TR/html4/appendix/notes.html#notes-invalid-docs>
[3] <http://www.w3.org/TR/REC-xml/#proc-types>