response.flash is just a variable and so is session.flash.
session.flash is copied into response.flash after redirection.

You are free to do things like:

session.flash=['warning','red','message']

or

session.flash='warning/red/message'

and have the JS break use its components. I'd prefer to leave it as a
string to keep it working with the default layout.

On Apr 15, 9:56 pm, Jason Brower <encomp...@gmail.com> wrote:
> Sure.  I even have a totally different design for mine.
> I made it fade in instead, and I had it use an entire block.  I did that
> with the jquery calls in the web_ajax.html file in the view section.
> Then I set the area in my layout.html.  Basically, take the old flash
> area text and cut and past it where you want it.>From there you start 
> creating some css to go with it.
>
> If you need more details I can share it with you.  I should probably at
> it to the wiki at that point.
> BR
> Jason
>
> On Wed, 2009-04-15 at 19:13 -0700, Iceberg wrote:
> > Currently I think most of us use response.flash as a resort to give
> > all kinds of feedback. For example:
>
> > def foo():
> >   form=SQLFORM(...)
> >   if form.accepts(...):
> >     if there_is_some_minor_issue:
> >       response.flash='Warning: your input is unusual, but anyway the
> > data is accepted'
> >     else:
> >       response.flash='ok, data is accepted'
> >   if form.errors:
> >     response.flash='Something is wrong'
>
> > Now all flash message show up in an orange bar. Can we have some
> > extended flash to be shown in different color? For example,
> >   response.flash_warn shows in yellow bar
> >   response.flash_info shows in light green bar
> >   response.flash_error shows in orange or even red bar
>
> > Perhaps session.flash should also support this proposal too?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to