User manual

© 2011 Racktivity NV 114/160
Antwerpsesteenweg 19 - 9080 Lochristi - Belgium - www.racktivity.com v 2014.5.14
Button Macro
The Button macro allows you to add a button to your page which executes some javascript
code.
Parameters
The macro accepts the following parameters:
href: link to a page
click: javascript code that is executed when clicking the button
name: name that appears on the button
title: title of the button, appears when you hover over the button
target: target of the link
icon: change the default icon of the button
Example
[[button:href=#/Doc/MacroButton, click=alert("This is DCPM"), name=Button,
title=Title, target=_blank /]]
Sample
How to Modify the Button Icon
Instead of using the default button icon as in the example above, one can choose his own
icon. In this example we use a smiley icon (emoticon_smile.png, taken from
www.famfamfam.com), that replaces the caret (^) sign. To do so, you have to add an icon
to your system. The location of the icon in PyLabs is /opt/qbase5/www/lfw/img. This
directory already contains a set of graphics. For maintenance reasons it is recommended to
create a directory, for example icons in which you store the icons.