471,850 Members | 1,230 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,850 software developers and data experts.

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
richard
Jul 20 '07 #1
6 5968
pbmods
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
fran7
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.

Thanks
Richard
Jul 21 '07 #4
pbmods
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
fran7
229 100+
Thanks for the suggestion. You were spot on.
its target=_self
works geat
Thanks
richard
Jul 21 '07 #6
pbmods
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
NeoPa
reply views Thread by NeoPa | last post: by
aboka
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.