How you define 'session.flash'?

2017-01-05 10:04 GMT-02:00 António Ramos <ramstei...@gmail.com>:

> in fact this
>
>     <script >
>      toastr.info("{{=session.flash}}");
>
>     </script>
>
> always produces a popup saying "None"
>
> why?
>
>
> 2017-01-05 11:50 GMT+00:00 António Ramos <ramstei...@gmail.com>:
>
>> *this works....*
>>
>>     {{if session.flash:}}
>>     <section class="content-header">
>>       <div class="alert alert-warning alert-dismissible fade in"
>> role="alert">
>>         <button type="button" class="close" data-dismiss="alert"
>> aria-label="Close">
>>           <span aria-hidden="true">×</span>
>>         </button>
>>         <strong>{{=T("Notification")}}:</strong> {{=session.flash}}
>>       </div>
>>     </section>
>>     {{pass}}
>>
>>
>> *But this does not work!!*
>>     <script >
>>     flash="{{=session.flash or 'empty'}}";
>>
>>     if (flash=="")
>>     {
>>     toastr.info(flash);
>>     }
>>
>>     </script>
>>
>> how to fix this ?
>>
>> Thank you
>> António
>>
>
> --
> 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 web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to