equanda provided scripts

equanda.js

Can be used by adding the following in your page class :


@Inject
@Path( "classpath:/org/equanda/tapestry5/resources/equanda.js" )
private Asset equandaJs;

public Asset getEquandaJs() { return equandaJs; }

And using this in your template as (in the "head" section) :


<script src="${equandaJs}" language="javascript" type="text/javascript" />

It provides the following javascript functions

equandaWindowHeight()

Get the browser window height (browser independent). This can for example be used to assure an Accordion fills the height of the window.

equandaConvertCase()

This function allow automatic case conversion on a input field. Use by adding a onkeyup event (extra parameter) handler on the input component.


onkeyup="equandaConvertCase( this, 2);"

This function eight does expects the form element to work on, and a value indicating how to convert the case.

  • 1 : convert everything to lower case
  • 2 : convert everything to upper case