Author Topic: HTML tag to open a window in new tab  (Read 9304 times)

0 Members and 1 Guest are viewing this topic.

Offline paragkalraTopic starter

  • Irregular
  • Posts: 29
  • Gender: Male
    • View Profile
    • paragkalra.com
HTML tag to open a window in new tab
« on: January 19, 2009, 02:00:18 PM »
Hey folks,

I am designing my own website. I want the tabs to open in new window with control remaining with the existing page.

I tried using
Quote
target="_blank"
. The link is getting opened in the new tab but the control is being transfered to the new page where as I want it to stay with the parent page.

I know to an extent it depends on the web-browser but still I want to know the best way to do so.
Parag.A.Kalra, The Linux Man
http://www.paragkalra.com/
In this world without WALLS and GATES who need WINDOWS! USE LINUX! STOP PIRACY! GO OPEN SOURCE!

Offline rhodesa

  • Staff Alumni
  • Freak!
  • *
  • Posts: 5,241
  • Gender: Male
  • Bold and nosy. I'm famous for that.
    • View Profile
    • VectorLoft.com
Re: HTML tag to open a window in new tab
« Reply #1 on: January 19, 2009, 03:45:52 PM »
with JUST html, i don't think this is possible. and personally, i hate it when sites do stuff like that. why should a window be open that i can't see
Aaron Rhodes
Lead Developer

Offline phparray

  • Enthusiast
  • Posts: 96
    • View Profile
    • HostMySite.com
Re: HTML tag to open a window in new tab
« Reply #2 on: January 19, 2009, 04:45:59 PM »
I agree. I don't believe this is possible.  Let your end users setup their browsers how they want.  Open in tabs is an option in Firefox.
Dave Arnold
Training Specialist darnold@hostmysite.com
http://www.hostmysite.com/?utm_source=bb
"I have not failed. I've just found 10,000 ways that won't work."
Thomas Edison

Offline haku

  • Guru
  • Freak!
  • *
  • Posts: 5,707
  • Old Man
    • View Profile
Re: HTML tag to open a window in new tab
« Reply #3 on: January 19, 2009, 09:56:22 PM »
Target is now deprecated, for the very reason that you shouldn't be taking control out of the hands of your users. If they want to open a new window/tab, they can do it themselves.

Offline paragkalraTopic starter

  • Irregular
  • Posts: 29
  • Gender: Male
    • View Profile
    • paragkalra.com
Re: HTML tag to open a window in new tab
« Reply #4 on: January 22, 2009, 12:37:53 PM »
I am sorry for making a slight mistake in my post...I actually want that all the URLS/Hyperlinks present on the index page of my website should by default either open in new window or in new tab...i.e. I want my index page to always remain open on the browser...
Parag.A.Kalra, The Linux Man
http://www.paragkalra.com/
In this world without WALLS and GATES who need WINDOWS! USE LINUX! STOP PIRACY! GO OPEN SOURCE!

Offline phparray

  • Enthusiast
  • Posts: 96
    • View Profile
    • HostMySite.com
Re: HTML tag to open a window in new tab
« Reply #5 on: January 22, 2009, 01:07:08 PM »
Use the target attribute.
Code: [Select]

<a target="_blank" ....

Dave Arnold
Training Specialist darnold@hostmysite.com
http://www.hostmysite.com/?utm_source=bb
"I have not failed. I've just found 10,000 ways that won't work."
Thomas Edison

Offline pimpdaddydeluxe

  • Irregular
  • Posts: 3
    • View Profile
Re: HTML tag to open a window in new tab
« Reply #6 on: February 09, 2009, 05:31:35 PM »
it's not really your place to decide. but i get it.  in a page im building, my links are div containers, so you cant really right click and go down to open in new window/ tab, but this might work (emphasis on might):

Code: [Select]
* {
target-new: tab ! important
}


i haven't gotten it to work yet, but i'm probably just missing something.

it's "theoretically" supposed to work if your browser knows what the hell you're talking about first.

"tabs? dude, i got tabs?!"


- good luck.