Hello.

You can do it with ajax:
            $.ajax({
                type: "POST",
                url: "{{=URL('f_ajax','get_user_events')}}",
                data:{east, west, south, north, user_period, userId},
                success: function( returnedData ) {
                    $( '#div_events' ).html( returnedData );
                }
            });

If you don't need to return something in a div just forget the success var.
I think it works.

Il giorno domenica 12 febbraio 2017 19:55:48 UTC+1, Andrea Fae' ha scritto:
>
> Ho to call a controller function from:
> - javascript (inside a view)
> - from html view ({{put controller function here?}}
>
> Can I have the exact syntax on both cases?
> Thank you
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to