Re: links to http addresses

Murray Altheim <[email protected]> Tue, 28 Aug 2007 11:38:19 +1200
Newsgroups gmane.comp.java.jspwiki.user
Message-ID <[email protected]>
Alex Samad wrote:
> Hi
> 
> Is there any way to make an link to a external http address open in a new 
> window?

I wrote a com.ecyrd.jspwiki.parser.LinkParser class that's been part of
the distribution since 2.5.10, so check the its javadocs for further
details. In short, you can add any of the attributes permitted in HTML
using the syntax:

    [Text | Link | attributes]

e.g.,

   [Acme | http://www.acme.com/ | id='foo' rel='Next']

creates:

   <a href="http://www.acme.com/" id="foo" rel="Next">Acme</a>

To open a link into a new window, HTML uses the 'target' attribute with
a value of "_blank":

   [Acme | http://www.acme.com/ | target='_blank']

This of course works for links to HTTP addresses, wiki page links,
interwiki links, etc.

Murray

...........................................................................
Murray Altheim <murray07 at altheim.com>                           ===  = =
http://www.altheim.com/murray/                                     = =  ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =

       Boundless wind and moon - the eye within eyes,
       Inexhaustible heaven and earth - the light beyond light,
       The willow dark, the flower bright - ten thousand houses,
       Knock at any door - there's one who will respond.
                                       -- The Blue Cliff Record