473,748 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<base target="???">

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
Jul 19 '05 #1
3 4576
Gazing into my crystal ball I observed "Lars Schlanbusch"
<la**@schlanbus ch.no> writing in news:3f******** @news.broadpark .no:
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
Jul 19 '05 #2

"Adrienne" <ar****@sbcglob al.net> wrote in message
news:Xn******** *************** *****@207.115.6 3.158...
Gazing into my crystal ball I observed "Lars Schlanbusch"
<la**@schlanbus ch.no> writing in news:3f******** @news.broadpark .no:
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 :o)

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

Jul 19 '05 #3
Gazing into my crystal ball I observed "Lars Schlanbusch"
<la**@schlanbus ch.no> writing in news:3f******** @news.broadpark .no:

"Adrienne" <ar****@sbcglob al.net> wrote in message
news:Xn******** *************** *****@207.115.6 3.158...
Gazing into my crystal ball I observed "Lars Schlanbusch"
<la**@schlanbus ch.no> writing in news:3f******** @news.broadpark .no:
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 :o)


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
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
8066
by: Kai Grossjohann | last post by:
The following HTML file invoker.html creates a modal dialog: <html><head> <script language="JavaScript"> function popup() { window.showModalDialog("main.html", null, "dialogHeight:300px;dialogWidth:500px;dialogLeft:100;dialogTop:100s"); } </script> </head><body>
6
77506
by: Tony Marston | last post by:
The code <a href="..." target="_blank">...</a> will not validate as XHTML STRICT because of the 'target' tag, so how do I achieve the same result by moving it to a CSS file? I cannot find anything which allows me to specify 'target=' on an anchor tag. -- Tony Marston http://www.tonymarston.net
10
60716
by: Dieter Salath? | last post by:
Hi, in our webpage, a user could open a windows explorer to his temp directory with a simple link and usage of the file protocol: <a href="file://C:\temp" target="_blank">C:\temp</a> This worked very well a long time, but now it does not work anymore. We use IE6 and Microsoft Windows XP Professional 2002 SP2. I guess it has something to do with new IE security features. Does
2
5324
by: Rez | last post by:
Hi Guys, I have a problem with exporting to excel from a modal dialog box. Basically, i have an ASPX page that gathers user criteria, and passes it to a dialogbox (showModalDialog), There is a grid on the dialog that will be populated based on the criteria. Since i am doing some postback on the dialog i have the following tag in the header: <base target="_self">
3
1455
by: Jim Carlock | last post by:
In creating a dynamic page with some static content, ie, the list of city names is standard HTML encoding. When I click on the link, I see the page reload itself instead of jumping to the content where <a name="raleigh"></a>. Any suggestions on how to get around this? Specifically the page I'm working with... http://microcosmotalk.com/live/category/NC/Swimming_Pool_Designers/?area=Raleigh+NC&builder=Swimming+Pool+Builder
1
1648
by: easy.lin | last post by:
.... <object id="10">door</object> .... I try to write this in clipse XSD editor <element name="object" type="string"> <attribute name="id" type="int"></attribute> </element> but get wrong message....
10
3754
by: Gernot Frisch | last post by:
Hi, I'm currently writing: <span onclick="window.open(...);">Klick Here</span> but I want to use the <a href> for this, since it is defined in the css script the way I want my link to open. Now, if I use a href, the href will be executed as well. What can I du in order to make the href not execute if javascript is enabled?
5
19933
by: Joe Kovac | last post by:
Hi! I want to add <base target="_self"> into the header section of a aspx page. I want to do this in the code behind because I use master pages which I do not want to change directly. Thanks Joe
6
6115
by: fran7 | last post by:
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
0
8983
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9528
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9359
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9236
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6792
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4592
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3298
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.