r1 - 08 Nov 2021 - 15:27:58 - TWikiGuestYou are here: TWiki >  TWiki Web > JSPopupPlugin
ANNUNCIO: L'aggiornamento dei pacchetti ISI produce importanti cambiamenti, leggete questa nota

JSPopupPlugin TWiki Plugin

JSPopupPlugin allows you to show dynamic content in a virtual popup. Good for status messages, or to show detailed information without causing the web browser's context to switch from the page that they requested.

There is a running demo of JSPopupPlugin running at the WikiRing demo site

NEW: Uses TWiki:Plugins.YahooUserInterfaceContrib

It uses javascript to create a popup window containing either a hidden pre-rendered part of a topic, or a TWiki request that is dynamically requested and served. Popups are activated either on a mouse click, when the mouse passes over the anchor, or when the page is loaded.

This will allow you to create a popup Comment Edit box:

%POPUP{anchor="<button class='twikiButton'>add comment</button>" popuptext="%COMMENT%" popuptexttype="tml"}%

or a popup menu of webs

anchor=" *listofwebs* " 
popuptext="%WEBLIST{"| [[$name.WebHome][$name]] |"}%" 

or a popup that quickly shows the topic source

anchor="<button class='twikiButton'>view topic Source</button>"

there is only one popup window at a time, so if the clicks on an anchor while another popup is up, it will be replaced by the new one.

Syntax Rules


parameters are

  • anchor="" - the text that is the click target that causes the POPUP to come up
    • (if this is not set, or an empty string, then the popup is shown on page load REMEMBER, only one popup open at a time)
  • anchortype="" - action done to trigger the popup - onclick,onmouseover ('onclick' is default)
  • popuptitle="" - what will be displayed in the popup title (not shown if border="off")
  • popuptext="" - what will be displayed in the popup
  • popuptexttype ="" - tml, rest
  • popuplocation="" - general location relative to the anchor (center, below) - center is default
  • border="" - show the border & close button (defaults to 'on') - if you select not to show the border and close button then there is an onmouseleave that closes the window
  • delay=200 - used as the delay in mS if the anchortype='mouseover'

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %JSPOPUPPLUGIN_SHORTDESCRIPTION%

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Creates a dynamic popup window

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip JSPopupPlugin.zip in your twiki installation directory. Content: File:Description:data/TWiki/JSPopupPlugin.txt Plugin topic data/TWiki/JSPopupPlugin.txt,v Plugin topic repository lib/TWiki/Plugins/JSPopupPlugin.pm Plugin Perl module
  • use the configure script to enable
  • Test if the installation was successful:

Plugin Info

Plugin Author: TWiki:Main.SvenDowideit - SvenDowideit@wikiring.com - WikiRing.com
Copyright: © 2001-2006, SvenDowideit@wikiring.com
License: GPL (GNU General Public License)
Plugin Version: 01 May 2021
Change History:  
23 Oct 2006: added delay by TWiki:Main.OliverKrueger, and added use of TWiki:Plugins.YahooUserInterfaceContrib
01 May 2006: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.1
CPAN Dependencies: JSON
Other Dependencies: TWiki:Plugins.YahooUserInterfaceContrib
Perl Version: 5.005
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/JSPopupPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/JSPopupPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/JSPopupPluginAppraisal

Related Topics: TWikiPlugins, DeveloperDocumentationCategory, AdminDocumentationCategory, TWikiPreferences

-- SvenDowideit@wikiring.com - WikiRing.com


This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.JSPopupPlugin