473,387 Members | 1,624 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,387 software developers and data experts.

target="_blank" cannot open a new window

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.

========= main.html ======================
<frameset>
<frame src="page1.asp">
</frameset>

================== page1.asp ==============

<form action="page2.asp" target="_blank">

================== page2.asp ==============

<form action="page3.asp" target="_blank">
Any workarounds?? Thanks!!
Jul 23 '05 #1
2 2810
Matt wrote on 01 jun 2004 in comp.lang.javascript:
In the following code, page1.asp is inside


Please do not multipost
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 23 '05 #2
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>
Jul 23 '05 #3

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

Similar topics

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 :...
1
by: Nick Messick | last post by:
I'm going through some old code and have found this a number of places. Seems kind of strange. Is there any reason why someone would do this?
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!...
6
by: Tony Marston | last post by:
The code <a href="..." target="_blank">...</a> will not validate as XHTML STRICT because of the 'target' tag, so how do I achieve the same result by moving it to a CSS file? I cannot find anything...
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...
4
by: ad | last post by:
I used Response.Redirect(sUrl); to open another .aspx But I want to open it in another browser like target="_blank" How can I do that?
5
by: Jon via DotNetMonster.com | last post by:
<siteMapNode title="share price" description="Link to Netcall on the London Stock Exchange" url="http://www.yahoo.co.uk" role="" target="_blank" /> Hi all I'm trying to open the Yahoo web...
5
by: John A Grandy | last post by:
I have a js function that dynamically generates a block of html that includes an anchor tag : <a href="http://www.google.com" target="_blank" /> When the user clicks this link, the new IE6...
6
by: fran7 | last post by:
Hi, I know that <base target="_blank"> will open all links in a new window. Anyone can suggest how to use it but selectively not open all the links. I have 10 links out of 100 that I dont want to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.