Open a new tab

Solved
Anonymous user -  
 Codeur61 -
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

Anonymous user
 
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
bchauchat Posted messages 1 Status Member
 
It works if we put the quotes: TARGET="_BLANK"
0
giheller
 
Hello,

<a href=..... target=_blank>
--
JL, well, that's just my opinion @+
getting help is not doing the work for you.
32
Sebby
 
Quick, precise, efficient. Thanks, buddy.
0
Anonymous user
 
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
neo_selen Posted messages 237 Status Member 15
 
You are aware that this is JavaScript???
0
Boostaut
 
What does it change?
0
neo_selen Posted messages 237 Status Member 15
 
La balise du sujet sert à préciser dans quel langage on souhaite la réponse ! HTML ou PHP.

NOT IN JAVASCRIPT !
0
neo_selen Posted messages 237 Status Member 15
 
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
Speacraft
 
At worst, you won't freeze.
0
K?vin
 
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
Codeur61
 
Yes, thank you very much!
0
Anonymous user
 
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
Tacus
 
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
Anonymous user
 
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
Olivier C
 
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
neo_selen Posted messages 237 Status Member 15
 
because Firefox is updated more quickly than Firefox when it comes to emerging web standards (currently, HTML5)
0
Anonymous user
 
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
dupasj
 
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