Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > <base target="???">

Reply
Thread Tools

<base target="???">

 
 
Lars Schlanbusch
Guest
Posts: n/a
 
      10-01-2003
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


 
Reply With Quote
 
 
 
 
Adrienne
Guest
Posts: n/a
 
      10-01-2003
Gazing into my crystal ball I observed "Lars Schlanbusch"
<(E-Mail Removed)> writing in news:3f7aa631$(E-Mail Removed):

> 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.

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
 
Reply With Quote
 
 
 
 
Lars Schlanbusch
Guest
Posts: n/a
 
      10-01-2003

"Adrienne" <(E-Mail Removed)> wrote in message
news:Xns940771A8B9324arbpenyahoocom@207.115.63.158 ...
> Gazing into my crystal ball I observed "Lars Schlanbusch"
> <(E-Mail Removed)> writing in news:3f7aa631$(E-Mail Removed):
>


> 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 )

>
> 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..

>
> --
> Adrienne Boswell
> Please respond to the group so others can share
> http://www.arbpen.com



 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      10-01-2003
Gazing into my crystal ball I observed "Lars Schlanbusch"
<(E-Mail Removed)> writing in news:3f7b1fb0$(E-Mail Removed):

>
> "Adrienne" <(E-Mail Removed)> wrote in message
> news:Xns940771A8B9324arbpenyahoocom@207.115.63.158 ...
>> Gazing into my crystal ball I observed "Lars Schlanbusch"
>> <(E-Mail Removed)> writing in news:3f7aa631$(E-Mail Removed):
>>

>
>> 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.


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.

>
>>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 )


Actually, you should not have to use a target attribute at all if you are
not using frames.

>
>>
>> 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..


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.


--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments