On Thursday, March 26, 2015 at 12:55:18 PM UTC-7, Dave S wrote:
> If you want something that happens on a button or on a javascript timer, > then you need to do the ajax yourself. I have an example already posted at > <URL:https://groups.google.com/d/msg/web2py/KYaf_L36qKw/4JMUUttAHk4J> > which puts an ajax call in a button . > > I think this is where I started: > <URL: > http://www.web2py.com/books/default/chapter/29/11/jquery-and-ajax#The-ajax-function > > > > When I posted this before, I didn't show the .html file, but that's pretty > simple. In that one you do make your DIVs, and I have two of those that > get filled by 2 different buttons. > > I spent some time yesterday figuring out how to add a spinner in the button. A lot of the time was due to fumble-finger-itis, but the .html("updating ..") fragment becomes .html(loading_str) which is something like loading_str = XML(CAT("updating ..", BR(), IMG(_src=URL('static', 'images/ajax-loader-busy.gif')))) (this example uses a gif the site cited by Derek in <URL:https://groups.google.com/d/msg/web2py/BQ1i-xahk8A/fKerUZlMZ6UJ>) /dps > -- 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.