Re: [web2py] Re: How to store data records for recurrent jQuery call

2013-05-23 Thread 冷春辉
Thank you Calvin and Alan. I'm not familiar with JSON and not much content in the book at the moment. I will do my research based on your suggestions. Regards, Lio On Wed, May 22, 2013 at 1:09 AM, Alan Etkin spame...@gmail.com wrote: You could then write some javascript to populate block 2

[web2py] Re: How to store data records for recurrent jQuery call

2013-05-21 Thread Alan Etkin
You could then write some javascript to populate block 2 using the rec object created... I think this alternative should do what you want too: (in a view) {{=SCRIPT( var myRows = %(rows)s; % dict(rows=set.select().as_json()))}} Then you can access the record values in

[web2py] Re: How to store data records for recurrent jQuery call

2013-05-19 Thread Calvin
I've not verified the code but something along the lines of: script var rec = JSON.parse('{{=json.dumps(db(db.xyz.id0).select().as_list())}}'); /script You could then write some javascript to populate block 2 using the rec object created... On Sunday, 19 May 2013 11:32:40 UTC+8, Lio wrote: