Hi
Is it possible to trigger the LOAD component when a user clicks on 
something, or can it only be used when a page is first loaded?
I have been using the ajax function to do this but would prefer the extra 
flexibility of LOAD if it is possible.

web2py.js comes with this function:

web2py_component(action, target, timeout, times)

*action* is a url from where the html is loaded into the document
*target* is the id of the element to use as container
*timeout* and *times* are optional timing parameters to use repeated or 
continuous loading with time intervals

You can use something like this in the view:

=SCRIPT("jQuery(<element id>).click(function(){web2py_component(<load 
action>,<target>);});")

-- 



Reply via email to