OpenLaszlo Project Blog » Laszlo Mail tooltip contributed to OpenLaszlo is an old post announcing the availability of tooltip code for OpenLaszlo (go there for a link to the code). I am using this code and it is easy to use and visually elegant.
I needed dynamic content for my tooltips. The display text for the tooltip changed depending on the data retrieved from the database. My solution was to create an ondata handler to set the text attribute of the tooltip. The initial text value was set to “Loading …”. I have never seen the initial value displayed in a tooltip, but I have left it there just in case.
<view clickable="true" datapath="xxx">
<handler name="ondata" args="p">
if (!p) return;
this.tooltip.setAttribute('text', this.datapath.xpathQuery('text()'));
</handler>
<tooltip name="tooltip" text="Loading ..." />
</view>
Improvements and suggestions welcome.
UPDATE: I just found that the tooltip code is part of the incubator for OL 3.3.3. No need to go get the code from anywhere!
hi is this possible to write tooltips for images?
i’m displaying data from xml at openlaszlo page its that possible to display?
how?
Regards
edinc