<base target="???">

  • Thread starter Lars Schlanbusch
  • Start date
L

Lars Schlanbusch

Hi!

Is there any way to set <base target="_blank"> for links which link to a
page outside the domain, and <base target="_self"> for links which link to a
page inside the domain?

Can i do such a thing in the global.asa file or maybe in an other include
asp file? I am working on a site with 3-4000 hyperlinks, and I do not look
forward to "marching" through every each one ove them and set target to
_blank og _self...

Thanks in advance

Lars Schlanbusch
 
A

Adrienne

Gazing into my crystal ball I observed "Lars Schlanbusch"
Hi!

Is there any way to set <base target="_blank"> for links which link to
a page outside the domain, and <base target="_self"> for links which
link to a page inside the domain?

Can i do such a thing in the global.asa file or maybe in an other
include asp file? I am working on a site with 3-4000 hyperlinks, and I
do not look forward to "marching" through every each one ove them and
set target to _blank og _self...

Thanks in advance

Lars Schlanbusch

This is probably another one of the reasons that the target attribute was
removed from XHTML Strict. Let the user decide if they want to open the
link in a new window or not. Remember there are many browsers out there
now that block commands to open new windows - even those with just the
target attribute, including javascript.

Additionally, I see you asking about _self. You're not using frames, are
you? Tsk, tsk, tsk.... unfriendly for visitors, search engines, etc.

As for putting something like that in a global.asa I would think not. The
target attribute is client side, not server side.

If you insist on opening new windows, and your links are generated from a
table, then you could add a field called maybe "outside", test whether the
link is outside or not, and build your a element accordingly.
 
L

Lars Schlanbusch

Adrienne said:
Gazing into my crystal ball I observed "Lars Schlanbusch"
<[email protected]> writing in
This is probably another one of the reasons that the target attribute was
removed from XHTML Strict. Let the user decide if they want to open the
link in a new window or not.

The problem here is that the site I am making don't want the user to "walk
away" from the site because he or she opens a link.
Remember there are many browsers out there
now that block commands to open new windows - even those with just the
target attribute, including javascript.

Additionally, I see you asking about _self. You're not using frames, are
you? Tsk, tsk, tsk.... unfriendly for visitors, search engines, etc.

Nope, I am not using frames, so actually I shouldn't use _self, but _top :eek:)
As for putting something like that in a global.asa I would think not. The
target attribute is client side, not server side.

If you insist on opening new windows, and your links are generated from a
table, then you could add a field called maybe "outside", test whether the
link is outside or not, and build your a element accordingly.

The problem here is that I have so many links, and i REALLY don't want to
"walk through" every single one of them specifying if they are external or
internal links if I don't HAVE to. The links are not in a table, they are
parts of long texts..
 
A

Adrienne

Gazing into my crystal ball I observed "Lars Schlanbusch"
The problem here is that the site I am making don't want the user to
"walk away" from the site because he or she opens a link.

If the user wants to walk away, that is their right. You should never
force anything on the user. Further, by opening a new window, you have
broken the back button. Some users are confused when a new window is
opened and they think there is no way to get back to where they originally
were.
Nope, I am not using frames, so actually I shouldn't use _self, but
_top :eek:)

Actually, you should not have to use a target attribute at all if you are
not using frames.
The problem here is that I have so many links, and i REALLY don't want
to "walk through" every single one of them specifying if they are
external or internal links if I don't HAVE to. The links are not in a
table, they are parts of long texts..

Again, let the user decide if they want to open the link in a new window.
Personally, this is something that I do all the time, and I'm sure that I'm
not alone.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top