If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.
Register Today on DNForum IT'S FREE!I cannot seem to figure out how to do this or find it anywhere.
I need to open a link in a NEW browser window.
In HTML, you do it with:
a href=". . . " target="_BLANK"
In JavaScript, you do it with:
window.open(". . . ");
How do you do this in PHP?
I tried:
header('Window-target: NEW');
header('Location: http://. . . ');
But I got a "Headers already sent" error in the main document.
ACK! Help please!
-Bob
. . .
Why don't you just use javascript within the php document? That's the way I do it. Not sure if there is an actual php command, but I guess there must be.
NETCHEAP - Discount Dotster Reseller - $7.99
FREE pushes from your dotster account, renew for $7.99! 1. Create a netcheap account. 2. Push from dotster to netcheap account name. 3. Renew for $7.99!
Ah you cant do this in php... its an active element which means it can only be used in browser code.
Hey Bob, I'm no php guru, but I think the server is telling you you're resending http headers again, which it sounds like the server doesn't like.Originally Posted by Bob
I would pursue generating an html doc, with a meta equiv tag and research if there's an http header that will open a new window, similar to how the "refresh" will redirect. I definitely don't know what every one of the http headers are and do. I think there's about 60 or so, not including mime type headers.
Another possibility I'd experiment with would be to use php to generate a javascript doc that in turn executes and opens the new window.
I don't know if that helps or not. I'm probably more confused than you!
WebCat
MetallicaForum.com - DomainElf.com - Exclaims.net
DomainExpires.com - TouringSound.com - SongNet.us
SongClick.com - DedicatedTraffic.com - AmericanMovie.us
Try this Bob.
Code:<?php echo '<a href="http://www.dnforum.com" target="_blank">www.dnforum.com</a>'; ?>
Unlimited Domain Hosting - $20/mo
Dedicated Server - $99/mo
Drop me a pm if you ever have any PHP-questions or if the above didn't help you out. Am fairly experienced and don't mind helping out! (That goes for all of you)
Bookmarks