By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,790 Members | 1,107 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,790 IT Pros & Developers. It's quick & easy.

open new window in a new tab

tolkienarda
100+
P: 316
hi all i am wondering what code is appropate to open a new window in a new tab

Expand|Select|Wrap|Line Numbers
  1. <a href="www.google.com" target=WHAT GOES HERE >
  2.  
Thanks
Eric
Jan 30 '07 #1
Share this Question
Share on Google+
4 Replies


SwitchBlade
P: 1
Should be this.

Expand|Select|Wrap|Line Numbers
  1. <a href="www.google.com" target="_blank">
  2.  
Jan 30 '07 #2

Expert 100+
P: 1,892
hi all i am wondering what code is appropate to open a new window in a new tab

Expand|Select|Wrap|Line Numbers
  1. <a href="www.google.com" target=WHAT GOES HERE >
  2.  
Thanks
Eric
You can use any of these:
_blank - the target URL will open in a new window
_self - the target URL will open in the same frame as it was clicked
_parent - the target URL will open in the parent frameset
_top - the target URL will open in the full body of the window

**Note _blank is not valid syntax for XHTML and will cause validation errors.


Aric
Jan 30 '07 #3

tolkienarda
100+
P: 316

**Note _blank is not valid syntax for XHTML and will cause validation errors.


Aric
according to w3schools _blank is a valid XHTML value

but back to my original question i tried using the _blank attribute and it opened in a new firefox window instead of a new tab.

if anyone has any advice on how to fix this problem i would love to hear from you.

thanks
eric
Jan 30 '07 #4

drhowarddrfine
Expert 5K+
P: 7,435
_blank no longer validates in xhtml strict. Find other methods.

You cannot open in a tab unless the browser is set by the user to allow this. Here is a discussion about this.
Jan 30 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.