Open a new tab

Solved
Hello,

I am on a PHP page and I want to access another PHP page, but the FORM I am using does it in the same tab and I would like it to open a new tab or even a new Internet window...

Is it possible in HTML or PHP?

--

Only the dark forces can open and close the doors of Silent Hill
Configuration: Windows XP Firefox 2.0.0.14

10 answers

  1. It's good, it works. However, it needs to be put:

     TARGET=_BLANK 


    in...

     <FORM ACTION="page.php" METHOD="POST" TARGET=_BLANK> 


    and not in...

     <INPUT TYPE="submit" VALUE="ok"> 


    Thank you very much for your help.

    --

    Only the dark forces can open and close the doors of Silent Hill
    37
    1. It works if we put the quotes: TARGET="_BLANK"
      0
  2. Hello,

    <a href=..... target=_blank>
    --
    JL, well, that's just my opinion @+
    getting help is not doing the work for you.
    32
    1. Quick, precise, efficient. Thanks, buddy.
      0
  3. You use the same thing with an onload and parent.document.location.href:

    Not tested, but normally it works
    --
    JuZa.e3b.org || No man's land, People are strange, & Jesus was a punk ## The Blood's Flowers
    #Engraved February# Sleepwalking Past Hope
    8
    1. You are aware that this is JavaScript???
      0
    2. What does it change?
      0
    3. La balise du sujet sert à préciser dans quel langage on souhaite la réponse ! HTML ou PHP.

      NOT IN JAVASCRIPT !
      0
    4. or, specify why, and at least make the effort to test, instead of throwing it out like that,
      in a way:
      "figure it out if it doesn't work, you'll waste some time but I don't really care, proof is, I haven't tested what I'm proposing!"
      0
    5. At worst, you won't freeze.
      0
  4. I am digging up this topic to respond in case it could help someone.
    <FORM ACTION="page.php" METHOD="post" TARGET="_blank">
    <INPUT TYPE="text" NAME="envoi"><br>
    <INPUT TYPE="submit" VALUE="ok">
    </FORM>
    4
    1. Yes, thank you very much!
      0
  5. However, in Internet Explorer, it doesn't always work... I don't understand why sometimes the command works and sometimes it doesn't.
    Under Mozilla, it works perfectly.
    --

    Only the dark forces can open and close the doors of Silent Hill.
    3
    1. Hello everyone,

      As a beginner webmaster, I'm looking for something similar:

      How can I force the opening of a tab (or two) in IE7 or Firefox when my site opens?
      I would like to display my homepage in the first one, and my guestbook in the second...

      Thanks in advance

      Tacus
      3
      1. Do you want to create a link that opens a page in a new tab?
        --
        http://JuZa.e3b.org ||| No man's land, People are strange, & Jesus was a punk
        2
        1. Yes, all of this is very interesting, but TARGET=_blank is not valid with W3C standards, mainly because of its intrusive nature for the user and the accessibility issues it creates for visually impaired individuals.
          2
          1. because Firefox is updated more quickly than Firefox when it comes to emerging web standards (currently, HTML5)
            0
        2. No, a form of the type:

          <form action="page.php" method="post"> <input type="text" name="envoi" />
          <input type="submit" value="ok" /> </form>

          Except that this code opens page.php in the same tab (and in the same window).
          I would like to modify it so that page.php opens in a new tab (or a new window).

          Is it possible?

          --

          Only the dark forces can open and close the doors of Silent Hill.
          1
          1. If you want to send input files to another page, you can use AJAX. AJAX is based on JavaScript and it sends the files to a document without the user leaving the page or anything else.
            After that, in PHP or HTML, I don't know how you could do it...
            1