Can A(cid='...') replace the "loading..." text as LOAD(content='...') does?

68 views
Skip to first unread message

Antonio Salazar

unread,
Feb 5, 2016, 6:10:15 PM2/5/16
to web2py-users
LOAD(content=x) will replace the button with x (default content is "loading...") until it gets a response back.
A() also replaces itself with "loading..." when using the callback or cid parameters, but I don't see a builtin way to replace "loading..." with, for example, a spinner image.

What alternatives do I have here?

Dave S

unread,
Feb 5, 2016, 7:34:12 PM2/5/16
to web2py-users
I don't see anything in html.py that looks directly helpful.  There is a reference to a pre_load something, but that seems to be defined elsewhere, and I'm not yet looking deep enough for it.

/dps


 

Niphlod

unread,
Feb 7, 2016, 4:31:33 AM2/7/16
to web2py-users
LOAD(...) has a "content" keyword just for it.
A() doesn't use "loading..." but "working...". it's customizable too, using _disable_with

Antonio Salazar

unread,
Feb 9, 2016, 1:06:24 PM2/9/16
to web2py-users
Thanks, this is much better than directly using data-loading-text and data-complete-text
Reply all
Reply to author
Forward
0 new messages