[Moin-user] opening page on another window

Roger Haase crosseyedpenguin at yahoo.com
Tue Apr 3 22:17:04 EDT 2007


--- Thomas Waldmann <tw-public at gmx.de> wrote:

> 
> > Moinmoin  1.5.6 on Linux
> > 
> > 'HelpOnLinking'  does not talk about syntax on
> > how to construct a link to open up a new window.
> 
> Moin does not open links in new windows (at least not the core code, 
> maybe there is some macro for that).
> 
> That is simply because the USER should decide whether he/she wants to
> 
> open a new window (and then, use the appropriate browser function for
> that).

There are at least two macros in the macro market for opening new
windows.  One is NewWindow by Changjune Kim, the other is NewWindow2.  

NewWindow uses a format that was deprecated in HTML 4.01:
    
   <a href="http://www.mysite.com" target="_blank">My Site</a> 

If I am not mistaken, I think the above may have been a part of the
core code for a while and was removed shortly after the target="_blank"
became deprecated.

Not all people agree that opening new windows is always a bad coding
practice that should be avoided.  Certainly the function has been
abused by advertisers.  Some people, myself included, think the
deprecation of the functionality in html 4.01 was merely a recognition
that a function to open a new window was misplaced in a markup language
like HTML -- there are better ways to do the same thing: namely
scripting.

The NewWindow2 macro is a slightly modified version of Changjune Kim's
version that uses Javascript to open a new window (which is not
deprecated).

   onclick="window.open(this.href); return false;"

As you may have guessed, I use this macro now and then.  I look at it
as an expanded tool-tip function.  Sometimes a web page designer will
realize that a few readers will need a bit of help.  Rather than try to
stuff a complex thought into a tool-tip or footnote, give the user a
link to open a new window, read the data, close the window, and
continue on.  Page designers are not forced to use the function, it is
an option that may be useful in some instances.  I personally would
like to see the macro back into the core code.

The NewWindow2 macro could use a bit of clean up. The copyright bothers
me, but I don't know what to do about it.

    Copyright (c) 2000-2001 by Changjune Kim <juneaftn at orgio.net>
    All rights reserved, see COPYING for details.

Also, I believe the "moin-popup.gif" referenced by the macro was never
converted to png and was deleted from moin releases some time ago.  

Roger Haase


 
____________________________________________________________________________________
TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/




More information about the Moin-user mailing list