HTML/Javascript code to open pages in a new tab?

Need technical advice on coding your web pages? Covers HTML, JavaScript, CSS, and some server side technologies. Also the issue of some webpages not displayed well.

HTML/Javascript code to open pages in a new tab?

Postby Poprocks » Sat 15 Nov, 2003 10:13 pm

I was just wondering if there was some kind of HTML or Javascript code that could be used to cause hyperlinks to open in new tabs (on Netscape, Mozilla, Opera, etc.) and simply open in a new window in Internet Explorer, Dillo, etc.
I for one would like to see web developers step into the next generation of web browsing -- the tab.

Thanks in advance.
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Firebird/0.7
From memory, Windows is a 32-bit hack on a 16-bit GUI, written for an 8-bit OS that originally ran on a PC with a 4-bit system bus, made by a 2-bit company that can't stand 1 bit of competition.

Windows: Stop complaining about it; stop using it.
Poprocks
junior member
junior member
 
Posts: 12
Joined: Sat 01 Nov, 2003 2:28 pm

Postby bhtooefr » Wed 18 Aug, 2004 1:13 pm

Well, you've got one little problem there. AFAIK, without using XUL (which non-Gecko browsers barf all over, and which might only WORK in Firefox), you can't tell a browser to open in a new TAB, just a new window (which it's up to the browser to interpret as a new tab).

Also, Dillo won't even touch JavaScript, so it'd have to be HTML.
UserAgent: Dillo/0.8.0
Don't be surprised by my UA flipping from Opera 7.5x Linux or Win, Netscape Communicator 4.8 Linux, Dillo 0.8.0, Mosaic 2.7b5 Linux, or Firefox 0.9 Win.
bhtooefr
junior member
junior member
 
Posts: 23
Joined: Tue 17 Aug, 2004 5:41 pm

Re: HTML/Javascript code to open pages in a new tab?

Postby Antony » Wed 18 Aug, 2004 9:03 pm

Poprocks wrote:I was just wondering if there was some kind of HTML or Javascript code that could be used to cause hyperlinks to open in new tabs (on Netscape, Mozilla, Opera, etc.)
No, you can't.
and simply open in a new window
Add [tt]target[/tt] attitude into your HTML tag ([tt]A[/tt]).
I for one would like to see web developers step into the next generation of web browsing -- the tab.
tab browsing is still a new way of browsing, and I personally don't think it should become a common feature.
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
User avatar
Antony
diamond member
diamond member
 
Posts: 15235
Joined: Tue 18 Jun, 2002 11:36 pm
Location: Sydney, Australia

Re: HTML/Javascript code to open pages in a new tab?

Postby mhiri » Thu 07 Sep, 2006 5:17 am

Antony wrote:
Poprocks wrote:I was just wondering if there was some kind of HTML or Javascript code that could be used to cause hyperlinks to open in new tabs (on Netscape, Mozilla, Opera, etc.)
No, you can't.


In the Google Desktop Search, when you open a search result, it's opened in a new tab. but as you know, you never know who google does!!
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5
mhiri
new member
new member
 
Posts: 1
Joined: Thu 07 Sep, 2006 5:11 am

Postby lukestaff » Tue 18 Nov, 2008 10:05 pm

I was looking for the exact same cod ebut couldnt find one then i saw this on google and here i am.. I noticed how to open a new window.. you use the target frame.. "target=_blank" so i thought i should try replacing "_blank" with "_newtab" just for kicks and see if it works and apperantly it does on most browsers.. i tried with ie7 and firefox and safari.. So ther you have it..
UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; FunWebProducts; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506)
lukestaff
new member
new member
 
Posts: 1
Joined: Tue 18 Nov, 2008 10:00 pm

Postby Flober » Wed 03 Feb, 2010 11:38 am

In HTML web programming language, to launch the new document (web pages) from links in a new window or tab effect is typically done through the use of target attributes on those links.

In this case, the link anchors will be using “_blankâ€
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7
Flober
new member
new member
 
Posts: 2
Joined: Wed 03 Feb, 2010 11:28 am


Return to Web Design and Page Coding

Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]