Void addAjaxCall(ElementTree element, AjaxEvent event, AjaxDocument(a) fn, a state, String applyid, String extravarname="", AjaxBehaviour behaviour=FalseIfDone)
Arguments
element: The element which will trigger the callevent: The event which will trigger the callfn: The function that will be usedstate: The state information to be passed to the functionapplyid: The ID of the element whose contents will be replaced by the function resultextravarname: The name of the Javascript variable which may contain extra information to be passed to the function. Defaults to the empty string, which means that no variable will be used.behaviour: The behaviour of the function with respect to the element's default behaviour. This can be used to preserve fallback behaviour when Javascript is not available.
Usage
Add an Ajax handler to an element, that will replace the contents of a named element with the result of a Kaya function when it is triggered.