Some of the information here may be outdated, please check the book instead
[edit]

Every field in web2py has a unique name and id. Look at the generated html to figure out the ID for your fields. Say you want to add a balloon to a field with id="mytable_myfield".

Download the jquery plugin http://plugins.learningjquery.com/cluetip

Include the .js files in the view that needs it

<script src="{{=URL(r=request,c='static',f='jquery.dimensions.js')}}" type="text/javascript"></script>
<script src="{{=URL(r=request,c='static',f='jquery.cluetip.js')}}" type="text/javascript"></script>

Add somewhere the following code:

<script>
$(document).ready(function(){
  $('#mytable_myfield').attr('title','Ballon Header Text|Balloon Body Text').cluetip({splitTitle: '|'});
  // add one entry for every field that needs a balloon
});
</script>

The js files have to be put in yourapp/static/ Also make sure you run a current version of web2py that includes the basic jquery.js

© 2008-2010 by Massimo Di Pierro - All rights reserved - Powered by web2py - design derived from a theme by the earlybird
The content of this book is released under the Artistic License 2.0 - Modified content cannot be reproduced.