<base target="???">

Discussion in 'ASP General' started by Lars Schlanbusch, Oct 1, 2003.

  1. 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
     
    Lars Schlanbusch, Oct 1, 2003
    #1
    1. Advertising

  2. Lars Schlanbusch

    Adrienne Guest

    Gazing into my crystal ball I observed "Lars Schlanbusch"
    <> writing in news:3f7aa631$:

    > 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
     
    Adrienne, Oct 1, 2003
    #2
    1. Advertising

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


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

    >
    > --
    > Adrienne Boswell
    > Please respond to the group so others can share
    > http://www.arbpen.com
     
    Lars Schlanbusch, Oct 1, 2003
    #3
  4. Lars Schlanbusch

    Adrienne Guest

    Gazing into my crystal ball I observed "Lars Schlanbusch"
    <> writing in news:3f7b1fb0$:

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

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


    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
     
    Adrienne, Oct 1, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rez
    Replies:
    2
    Views:
    3,858
  2. Replies:
    0
    Views:
    577
  3. Replies:
    3
    Views:
    1,677
  4. James Lee

    base target inside file, not link

    James Lee, Jun 8, 2004, in forum: HTML
    Replies:
    1
    Views:
    392
    David Dorward
    Jun 8, 2004
  5. mohit
    Replies:
    0
    Views:
    607
    mohit
    Jan 23, 2008
Loading...

Share This Page