On Thursday, March 26, 2015 at 5:01:56 AM UTC-7, Garry Smith wrote: > > Hi > > After testing, and getting the data to load Via > {{=LOAD(c = 'default', f = 'test.load', target = 'test', ajax=True)}} > > > > > When loading the page I get the updated results as required, but it says > in the doc Web2py Doc > <http://web2py.com/books/default/chapter/29/12/components-and-plugins>, > that "The DIV content is refreshed without reloading the rest of the > page." > But if I update data from a different page or on the same page the data > does not update, without a refresh. > [...] >
Think of the LOAD() as a macro that ties Ajax and page complete together. On page complete, the ajax-under-the-hood is used to stuff the desired content in the div. Page complete happens once. You can set an automatic refresh in the html for your page, though. There's mixed opinions on doing that. 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 do not know what happens if you try to use LOAD() two different places in one page. /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.