You can instead put that code in the view of the controller. If you need it
across multiple actions, just create a separate view template for it and
use {{include ...}} to include it wherever needed.
Anthony
On Thursday, June 29, 2017 at 9:25:00 AM UTC-4, Filipe Reis wrote:
>
> Thanks for your time, this seems to be a solution to exactly what I want
> however when I try to implement it I get this error:
> Resource interpreted as Document but transferred with MIME type
> application/json
>
> Should this be a problem because I am including the web2py javascript
> also? It needs to be included because of these other stuff like the
> web2py_ajax_page function and others.
>
>
> Also when the post is not successful the flash seems to not work this way
> since the request is trapped? (because was called via the
> web2py_ajax_page("GET", url, "", target);)
>
--
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.