[web2py] ajax polling with web2py

2010-12-23 Thread weheh
How would I do this? #view DIV(A('click me',_href='#',_id='parent',_onclick(ajax('clickback', ['parent'],':eval');))) #controller def clickback(): return 'jQuery(#parent).html(%s);' %\ SCRIPT(alert('hello world');) So that when I click on click me it calls the clickback, which inserts the

Re: [web2py] ajax polling with web2py

2010-12-23 Thread Michele Comitini
I do not know what criteria you would use to understand if #parent is acceptable or not but you can pass as many other ids as you need: DIV(A('click me',_href='#',_id='parent',_onclick(ajax('clickback', ['parent', '2nd', '3rd', ... 'nth'],':eval');))) #controller def clickback(): for t in