Try wrapping it in XML():
var w2p_flash = {{=XML(response.json(response.flash)) if response.flash else
'null'}};
Anthony
On Thursday, June 29, 2017 at 11:25:20 AM UTC-4, Filipe Reis wrote:
>
> Was looking better it seems that this is a problem with how response.flash
> passes the value.
>
> var w2p_flash = {"message": "New client inserted into
> database.", "options": {"theme": "lime",
> "heading": "Success"}};
>
>
> This is how the flash is passed to the view, is there any way to get it
> right with " instead of " since response.json cannot handle it this
> way?
>
> For the view that is loaded via ajax and not showing the flash would you
> say that I need to do the same for this particular view?
>
> Thanks for all your time.
>
--
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.