469,578 Members | 1,883 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,578 developers. It's quick & easy.

open all links with <base target="_blank"> bar a few

229 100+
Hi, I know that <base target="_blank"> will open all links in a new window.
Anyone can suggest how to use it but selectively not open all the links.
I have 10 links out of 100 that I dont want to open in a new window.
Thanks in advance
Jul 20 '07 #1
6 5895
5,821 Expert 4TB
Heya, Richard. Welcome to TSDN!

I'm going to go ahead and move this thread to the HTML forum, where one of our resident Experts will be more likely to see it.
Jul 21 '07 #2
Well if you have specific ones you don't want to open in a new window, just remove the target="_blank" from the code
Jul 21 '07 #3
229 100+
Thanks for the reply, but I think I didnt say it well. I have many links and so to avoid excessive code was putting <base target="_blank"> in the head to apply to all links. Thats when the problem of it not being applied to the few links I didnt want to open in new windows came up.
Any suggestion, its all to avoid putting target="_blank" in each link.

Jul 21 '07 #4
5,821 Expert 4TB
Heya, Richard.

Are these links hand-coded, or are they being generated by a script?

Try setting a different target for the 10 links that you don't want to open in a new window (though I'm not sure what that target should be).
Jul 21 '07 #5
229 100+
Thanks for the suggestion. You were spot on.
its target=_self
works geat
Jul 21 '07 #6
5,821 Expert 4TB
Ah. Excellent.

Glad to hear you got it working! Good luck with your project, and if you ever need anything, post back anytime :)
Jul 22 '07 #7

Post your reply

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

Similar topics

3 posts views Thread by Lars Schlanbusch | last post: by
5 posts views Thread by John A Grandy | last post: by
10 posts views Thread by Gernot Frisch | last post: by
32 posts views Thread by fran7 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.