target="_blank" cannot open a new window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matt

    #1

    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.a sp" target="_blank" >

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

    <form action="page3.a sp" target="_blank" >


    Any workarounds?? Thanks!!
  • Evertjan.

    #2
    Re: target=&quot;_b lank&quot; cannot open a new window

    Matt wrote on 01 jun 2004 in comp.lang.javas cript:
    [color=blue]
    > In the following code, page1.asp is inside[/color]

    Please do not multipost


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    Comment

    • Thomas 'PointedEars' Lahn

      #3
      Re: target=&quot;_b lank&quot; cannot open a new window

      Matt wrote:
      [color=blue]
      > 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.[/color]

      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,
      [color=blue]
      > ========= main.html =============== =======
      > <frameset>
      > <frame src="page1.asp" >[/color]

      (hopefully this is not your only frame)
      [color=blue]
      > </frameset>
      >
      > =============== === page1.asp ==============
      >
      > <form action="page2.a sp" target="_blank" >
      >
      > =============== === page2.asp ==============
      >
      > <form action="page3.a sp" target="_blank" >
      >
      >
      > Any workarounds?? Thanks!![/color]

      "_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.infosystem s.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#note s-invalid-docs>
      [3] <http://www.w3.org/TR/REC-xml/#proc-types>

      Comment

      Working...