<script>
...
ajax('url/to/the/controller/function', [], 'target_element_for_the_return');
...
</script>

the ajax function is included in web2py_ajax.js, the second argument is a
list/array ['input'] to be used if you want to send form input values to
the server, you can leave it null with an empty list [].

The last argument is the target element, if the controller returns some
data, the data will be included in that element, or leave it null "" to do
nothing with the return.

In the book there is more examples and details.
http://web2py.com/books/default/chapter/29/11

On Tue, Jan 31, 2012 at 6:14 AM, Sanjeet Kumar <sanjeet....@gmail.com>wrote:

> How to call the Controller function from javascript




-- 

Bruno Rocha
[http://rochacbruno.com.br]

Reply via email to