PDA

View Full Version : Open In New Tabs


Stormraven
04-10-2009, 03:35 AM
I want to open link's in a new window but I have heard that if I use:

<a target=?_blank? href=?http://blahblah.com?>new link</a>

the 'target="_blank"' breaks XHTML strict validation, and i have been told to use this method to stop if from breaking validation, ive been told to use this:

http://www.sitepoint.com/article/standards-compliant-world/3/

how and where do i apply that JS code to my site to stop the target=?_blank? from breaking strict validation?

Kind Regards
Stormraven.

Brother Malachi
04-10-2009, 05:55 AM
Honestly...using target="_blank" and breaking XHTML strict validation won't kill you ;)
And why are you even using strict? Use Transitional.

Stormraven
04-10-2009, 04:34 PM
I am, it also breaks

I'm validating as 'XHTML 1.0 Transitional', it breaks this too when I use target="_blank"

Please help :(

Brother Malachi
04-10-2009, 05:03 PM
Try using this: http://www.badlydrawntoy.com/2009/03/03/replacing-target_blank-for-strict-xhtml-using-jquery-redux/

but anyway, why are you so keen on validating XHTML. Like I was saying earlier it won't kill you to use _blank

Stormraven
04-10-2009, 05:16 PM
I know what the code is, but where does it go in the template? Where do I put the code?

Stormraven
04-11-2009, 09:07 PM
Can someone help me please? :'(

Brother Malachi
04-13-2009, 06:13 AM
Put the javascript in your root template (such as forumhome)